Manages the ImGui-based configuration UI. More...
#include <config_ui.h>
Collaboration diagram for ConfigUI:Public Member Functions | |
| ConfigUI (IConfigService *configService, IKeybindProvider *keybindProvider, IAssetManager *assets, size_t *currentIndex, std::vector< TableData > *tables, IAppCallbacks *appCallbacks, bool &showConfig, bool standaloneMode=false) | |
| Constructs a ConfigUI instance. | |
| void | drawGUI () |
| Draws the configuration UI. | |
| void | handleEvent (const SDL_Event &event) |
| Handles an SDL event for keybinding capture. | |
| void | saveConfig () |
| Saves the current configuration. | |
| bool | shouldClose () const |
| Checks if the UI should close. | |
| bool | isStandalone () const |
| Checks if the UI is in standalone mode. | |
| void | resetSectionToDefault (const std::string §ionName) |
| Resets a section to its default values. | |
| void | refreshUIState () |
Manages the ImGui-based configuration UI.
Class for runtime configuration UI (forward declaration).
This class provides the main interface for rendering and managing the configuration UI in ASAPCabinetFE. It supports standalone and integrated modes, handles keybinding capture, file dialogs, and section-specific rendering, and triggers reloads based on configuration changes.
| ConfigUI::ConfigUI | ( | IConfigService * | configService, |
| IKeybindProvider * | keybindProvider, | ||
| IAssetManager * | assets, | ||
| size_t * | currentIndex, | ||
| std::vector< TableData > * | tables, | ||
| IAppCallbacks * | appCallbacks, | ||
| bool & | showConfig, | ||
| bool | standaloneMode = false |
||
| ) |
Constructs a ConfigUI instance.
Initializes the configuration UI with the specified dependencies and mode.
| configService | Pointer to the IConfigService instance for configuration management. |
| keybindProvider | Pointer to the IKeybindProvider instance for keybinding management. |
| assets | Pointer to the IAssetManager instance for asset handling. |
| currentIndex | Pointer to the current table index (unused in this implementation). |
| tables | Pointer to the vector of table data (unused in this implementation). |
| appCallbacks | Pointer to the IAppCallbacks instance for application callbacks. |
| showConfig | Reference to a flag indicating if the UI should be shown. |
| standaloneMode | Optional flag for standalone mode (default: false). |
Here is the call graph for this function:| void ConfigUI::drawGUI | ( | ) |
Draws the configuration UI.
Renders the ImGui window with all configuration sections and buttons.
Here is the call graph for this function:
Here is the caller graph for this function:| void ConfigUI::handleEvent | ( | const SDL_Event & | event | ) |
Handles an SDL event for keybinding capture.
Processes SDL events to capture key or joystick inputs during keybinding setup.
| event | The SDL event to handle. |
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Checks if the UI is in standalone mode.
Here is the caller graph for this function:| void ConfigUI::resetSectionToDefault | ( | const std::string & | sectionName | ) |
Resets a section to its default values.
Restores the specified section to its default configuration.
| sectionName | The name of the section to reset. |
Here is the caller graph for this function:| void ConfigUI::saveConfig | ( | ) |
Saves the current configuration.
Applies changes to the configuration service and triggers necessary reloads.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Checks if the UI should close.