ASAPCabinetFE
 
Loading...
Searching...
No Matches
PlayfieldOverlay Class Reference

Manages ImGui-based UI overlays for the playfield display. More...

#include <playfield_overlay.h>

+ Collaboration diagram for PlayfieldOverlay:

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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ PlayfieldOverlay()

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.

Parameters
tablesPointer to the list of table data.
currentIndexPointer Items the current table index.
configServiceThe configuration service for accessing settings.
windowManagerThe window manager for playfield window dimensions.
assetManagerThe asset manager for accessing textures or video players.
+ Here is the call graph for this function:

Member Function Documentation

◆ isMetadataPanelVisible()

bool PlayfieldOverlay::isMetadataPanelVisible ( ) const
inline

Checks if the metadata panel is visible.

Returns
True if the metadata panel is visible, false otherwise.
Note
Controlled by the showMetadataPanel_ member, which is updated via configUI.

◆ render()

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.

+ Here is the call graph for this function:

◆ updateSettings()

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.

Parameters
settingsThe application settings to apply.

The documentation for this class was generated from the following files: