Manages ImGui-based UI overlays for the playfield display. More...
#include <playfield_overlay.h>
Public Member Functions | |
PlayfieldOverlay (const std::vector< TableData > *tables, size_t *currentIndex, IConfigService *configService, IWindowManager *windowManager, IAssetManager *assetManager, std::function< void()> refreshUICallback) | |
Constructs a PlayfieldOverlay instance. | |
void | render () |
Renders all ImGui overlay elements. | |
bool | isMetadataPanelVisible () const |
Checks if the metadata panel is visible. | |
void | updateSettings (const Settings &settings) |
Updates overlay settings. | |
void | ResetMetadataFlags () |
Manages ImGui-based UI overlays for the playfield display.
This class renders ImGui elements, such as scrollbars, navigation arrows, and metadata panels, on the playfield display. It uses table data to display metadata, configuration services for settings, window management for positioning, and asset management for potential texture or video needs. Customization is supported through namespace-defined settings (e.g., NavigationArrowSettings for arrows, ScrollbarSettings for scrollbars, MetadataPanelSettings for panels) that can be adjusted via configUI.
PlayfieldOverlay::PlayfieldOverlay | ( | const std::vector< TableData > * | tables, |
size_t * | currentIndex, | ||
IConfigService * | configService, | ||
IWindowManager * | windowManager, | ||
IAssetManager * | assetManager, | ||
std::function< void()> | refreshUICallback | ||
) |
Constructs a PlayfieldOverlay instance.
Initializes the overlay with dependencies for table data, current table index, configuration, window management, and asset management. The overlay's appearance is governed by customizable settings in namespaces (e.g., NavigationArrowSettings, ScrollbarSettings, MetadataPanelSettings) that can be modified via configUI.
tables | Pointer to the list of table data. |
currentIndex | Pointer Items the current table index. |
configService | The configuration service for accessing settings. |
windowManager | The window manager for playfield window dimensions. |
assetManager | The asset manager for accessing textures or video players. |
|
inline |
Checks if the metadata panel is visible.
void PlayfieldOverlay::render | ( | ) |
Renders all ImGui overlay elements.
Draws the scrollbar, navigation arrows, and metadata panel (if visible) on the playfield display using ImGui. The appearance and visibility of these elements are controlled by settings in NavigationArrowSettings, ScrollbarSettings, and MetadataPanelSettings, which can be tweaked via configUI.
void PlayfieldOverlay::updateSettings | ( | const Settings & | settings | ) |
Updates overlay settings.
Reconfigures the overlay based on the provided application settings, such as UI visibility or positioning. This includes updating the showMetadataPanel_ flag and can be extended to reflect changes in NavigationArrowSettings, ScrollbarSettings, or MetadataPanelSettings via configUI.
settings | The application settings to apply. |