MiniMenuUI ​
Inherits: HUDUIElement < Control
MiniMenuUI is a row of quick-access buttons that open the panels of the interface. A button belongs to a panel KEY NUMBER (1 to 20): the number a panel sets in its "Panel keybind" option, which is also the input action panel_keybind_N that opens it from the keyboard. The button shows the icon and the description that the panel sets, and the key that opens it.
Description ​
Key features:
- The buttons are made from the numbered panels of the interface: a panel you make and number gets a button without any list to keep up to date
- Which numbers show, and in what order, can be chosen; by default every panel that wants a button shows, by number
- Emits
panel_number_requestedto the InGameUI, which toggles the panel
Properties ​
PackedScene | mini_menu_button_scene | |
Array[int] | button_numbers | [] |
Variables ​
Array[MiniMenuButton] | menu_buttons | [] |
Methods ​
void | initialize_ui( p_system_hub: GameHost.SystemHub ) |
void | setup_panels( panels: Array[PanelUI] ) |
Array[int] | get_button_numbers() |
Signals ​
panel_number_requested( panel_number: int ) ​
Signal emitted when a menu button asks for the panel of a number to be toggled
Property descriptions ​
PackedScene mini_menu_button_scene ​
Scene to instantiate for each menu button
Array[int] button_numbers = [] ​
The panel key numbers that get a button, in the order of the buttons. Empty = every panel that has a number and asks for a button (its "Show in mini menu" option), by number
Variable descriptions ​
Array[MiniMenuButton] menu_buttons = [] ​
The buttons that were made
Method descriptions ​
void initialize_ui( p_system_hub: GameHost.SystemHub ) ​
Sets the part up with the hub of the game systems: connects the signals it listens to and fills it.
void setup_panels( panels: Array[PanelUI] ) ​
The interface says which panels there are: the buttons are made (again) from them
Array[int] get_button_numbers() ​
The numbers of the buttons, in order