Namespace: DadGUI::cUIMenu Files: cUIMenu.h / cUIMenu.cpp Directory: DAD_FORGE/GUI/Components/ Inheritance: iUIComponent Description: Manages the main menu display, navigation between items, and activation of sub-menus.
📋 Class Description
The cUIMenu class is a user interface component that manages a tabular menu system (tabs). It allows listing multiple items (MenuItem), navigating between them via an encoder, and managing the activation of associated components. It also supports horizontal scrolling and displays directional arrows if the item list exceeds the screen width.
🔗 External Dependencies
File Inclusions
Included File
Source
Role
"GUI_Include.h"
DAD_FORGE/GUI
Access to base types, graphic components, constants, and global objects used by the GUI
Global Variables Used and Driver Objects
Variable / Object
Type
Source
Role
__Display
Display
Global GUI Context
Graphic display manager
__pActivePalette
Palette*
Global GUI Context
Access to colors for menu rendering
__LayerMenuLayerDyn
cLayer
Global GUI Context
Dynamic layer for the menu
__LayerMenuLayerStat
cLayer
Global GUI Context
Static layer for the menu
🎯 Associated Enumerations and Structures
MenuItem
Represents an individual entry in the menu.
Element
Type
Description
Name
std::string
Display name of the menu item
pItem
iUIComponent*
Pointer to the GUI component associated with this item
pNextMenu
cUIMenu*
Optional pointer to a sub-menu
📚 Public Methods
Init
Element
Details
Method
void Init()
Description
Initializes the menu system by creating render layers, clearing the item list, and resetting navigation states.