Interface for managing user input and associated actions. More...
#include <iinput_manager.h>
Public Member Functions | |
virtual | ~IInputManager ()=default |
Virtual destructor for proper cleanup of derived classes. | |
virtual void | handleEvent (const SDL_Event &event)=0 |
Handles an SDL input event. | |
virtual void | registerActions ()=0 |
Registers action handlers for input events. | |
virtual void | setDependencies (IAssetManager *assets, ISoundManager *sound, IConfigService *settings, size_t ¤tIndex, std::vector< TableData > &tables, bool &showConfig, bool &showEditor, bool &showVpsdb, const std::string &exeDir, IScreenshotManager *screenshotManager, IWindowManager *windowManager, std::atomic< bool > &isLoadingTables, ITableLauncher *tableLauncher, ITableCallbacks *tableCallbacks)=0 |
Sets dependencies for input handling. | |
virtual void | setRuntimeEditor (ConfigUI *editor)=0 |
Sets the runtime configuration editor. | |
virtual bool | isConfigActive () const =0 |
Checks if the configuration UI is active. | |
virtual bool | isEditorActive () const =0 |
Checks if the metadata editor UI is active. | |
virtual bool | isCatalogActive () const =0 |
Checks if the metadata catalog UI is active. | |
virtual bool | shouldQuit () const =0 |
Checks if the application should quit. | |
Interface for managing user input and associated actions.
This pure virtual class defines methods for handling SDL input events (keyboard, joystick, mouse), registering application actions, and setting up dependencies for interactive event processing. Implementers, such as InputManager, coordinate with components like IAssetManager, ISoundManager, and IScreenshotManager to manage user interactions, including table navigation, configuration UI, and screenshot mode.
|
pure virtual |
Handles an SDL input event.
Processes the provided SDL event (keyboard, joystick, mouse) and triggers the corresponding action based on the input configuration.
event | The SDL event to process. |
Implemented in InputManager.
|
pure virtual |
Checks if the metadata catalog UI is active.
Implemented in InputManager.
|
pure virtual |
Checks if the configuration UI is active.
Implemented in InputManager.
|
pure virtual |
Checks if the metadata editor UI is active.
Implemented in InputManager.
|
pure virtual |
Registers action handlers for input events.
Sets up the mapping of action identifiers to their corresponding handler functions.
Implemented in InputManager.
|
pure virtual |
Sets dependencies for input handling.
Configures the input manager with references to components and data needed for action handling, such as assets, sound, settings, and table data.
assets | The asset manager for accessing textures and video players. |
sound | The sound manager for playing UI sounds. |
settings | The configuration service for accessing settings. |
currentIndex | Reference to the current table index. |
tables | The list of table data. |
showConfig | Reference to the configuration UI visibility flag. |
exeDir | The executable directory for resolving paths. |
screenshotManager | The screenshot manager for screenshot mode. |
windowManager | The window manager for renderer access. |
Implemented in InputManager.
|
pure virtual |
Sets the runtime configuration editor.
Assigns the configuration UI editor for runtime settings adjustments.
editor | The configuration UI editor to set. |
Implemented in InputManager.
|
pure virtual |
Checks if the application should quit.
Implemented in InputManager.