#include <UIMenu.hpp>
|
| void | animateSelection () |
| virtual void | prevOption () |
| | Changes the current options to the previous options.
|
| virtual void | resetHook ()=0 |
| | Used to set the default pauseMessage and options values.
|
| virtual void | closeHook ()=0 |
| | Execute logic after the root menu is exited.
|
Definition at line 20 of file UIMenu.hpp.
◆ UIMenu()
| UIMenu::UIMenu |
( |
bool | iCustomRender = false | ) |
|
|
inline |
Construct a new UIMenu.
- Parameters
-
| iCustomRender | if a custom render is used, the UISystem doesn't draw the options, instead the UIScreen does |
Definition at line 77 of file UIMenu.hpp.
◆ animateSelection()
| void UIMenu::animateSelection |
( |
| ) |
|
|
private |
◆ changeMenu()
Changes the active menu.
- Parameters
-
| newOptions | the new menu options. |
- Returns
- ViewState the View to switch to
Definition at line 48 of file UIMenu.cpp.
◆ closeHook()
| virtual void UIMenu::closeHook |
( |
| ) |
|
|
privatepure virtual |
◆ getOptions()
| etl::span< MenuOption > UIMenu::getOptions |
( |
| ) |
const |
|
inline |
Gets the options of the active menu.
- Returns
- etl::span<MenuOption> the active options
Definition at line 121 of file UIMenu.hpp.
◆ getSelectedOption()
| int UIMenu::getSelectedOption |
( |
| ) |
const |
|
inline |
Gets the index of the selected option.
- Returns
- int the selected option index
Definition at line 101 of file UIMenu.hpp.
◆ getStartIndex()
| int UIMenu::getStartIndex |
( |
| ) |
const |
|
inline |
Gets the index of the first visible option.
- Returns
- int the start index
Definition at line 111 of file UIMenu.hpp.
◆ prevOption()
| void UIMenu::prevOption |
( |
| ) |
|
|
privatevirtual |
Changes the current options to the previous options.
- Note
- Override if a menu manually manages its state (doesn't use changeMenu, default prevOption functions)
Reimplemented in BattleMenu.
Definition at line 70 of file UIMenu.cpp.
◆ resetHook()
| virtual void UIMenu::resetHook |
( |
| ) |
|
|
privatepure virtual |
◆ resetMenu()
| void UIMenu::resetMenu |
( |
| ) |
|
|
virtual |
Resets the menu to its initial state.
Definition at line 7 of file UIMenu.cpp.
◆ selectionOffset()
| int UIMenu::selectionOffset |
( |
| ) |
const |
◆ setVisibleOptions()
| void UIMenu::setVisibleOptions |
( |
int | count | ) |
|
|
inline |
Sets the visible option count of a custom render menu, as UISystem only sets it for the menus it draws.
- Parameters
-
| count | the number of options visible at once |
Definition at line 131 of file UIMenu.hpp.
◆ updateAnimation()
| void UIMenu::updateAnimation |
( |
| ) |
|
◆ updateHook()
Optional hook to call during the update loop.
Can override the return from the standard update loop
Reimplemented in BattleMenu, and PauseMenu.
Definition at line 89 of file UIMenu.cpp.
◆ UISystem
◆ animator
◆ customRender
| const bool UIMenu::customRender |
|
private |
◆ isActive
| bool UIMenu::isActive = false |
|
protected |
◆ nextViewState
◆ options
◆ pauseMessage
| std::string UIMenu::pauseMessage = "Pause" |
|
protected |
◆ prevOptions
◆ selectedOption
| int UIMenu::selectedOption = 0 |
|
protected |
◆ selectionX
| int UIMenu::selectionX = 0 |
|
private |
◆ startIndex
| int UIMenu::startIndex = 0 |
|
protected |
◆ text
◆ visibleOptions
| int UIMenu::visibleOptions = 0 |
|
private |
- Note
- visibleOptions is set via the UISystem via the ConfigureUIMenu event handler
Definition at line 45 of file UIMenu.hpp.
The documentation for this class was generated from the following files: