Class MenuItem

Class Documentation

class MenuItem

Class used to store data and functions relating to an item within the engine’s debug menu.

Public Functions

MenuItem()

Empty and unused constructor.

~MenuItem()

Empty and unused destructor.

void SetupMenuItem(MenuItemType _type, std::string _title)

Prepares the menu item for use.

Parameters
  • _type: - The type of menu item to treat this item as.

  • _title: - The title of this menu item.

void HandleKeyEnter()

Called when the menu item is active and the enter key is pressed.

void HandleKeyLeft()

Called when the menu item is active and the left arrow key is pressed.

void HandleKeyRight()

Called when the menu item is active and the right arrow key is pressed.

Public Members

MenuItemType item_type

The type of menu item. See Blam::DebugMenu::MenuItemType for details.

std::string title

The title of the debug menu item as shown in the menu.

std::string exec_line = ""

The command to run upon activation for an Executor menu item type.

std::vector<MenuItem> items

The contents of the submenu to show upon activation.

std::string global_id = ""

The ID of the engine global to modify upon activation.

bool use_bounds = false

Whether or not arbitrary bounds are specified in debug_menu_init.

double inc = 1

How much to add or remove from the value at a time upon activation.

double min = 0

The minimum value specified in debug_menu_init.

double max = 0

The maximum value specified in debug_menu_init.

std::vector<std::string> exec_sequence

The command sequence to run upon activation for an ExecSequence menu item type.

int current_exec_index = 0

The index of the next item to run within the execution sequence.