Class DebugMenuItem

Inheritance Relationships

Base Type

Class Documentation

class DebugMenuItem : public BlamRendering::RenderStack::StackObjectBase

Stack item representing a single item within the debug menu.

For more details on the debug menu itself, see Blam::DebugMenu

Public Functions

DebugMenuItem()

Prepares the item for drawing.

~DebugMenuItem()

Deletes any resources used by the item.

void UpdateItemTextColor()

Updates the text color of the item based on the item type.

void SetDefaultBarDimensions(int _width, int _height)

Sets the default size of the item.

Parameters
  • _width: - The default width of the item.

  • _height: - The default height of the item.

void UpdateMetadata()

Refresh any data needed for the item.

This function will determine the scale factor (and change its size accordingly), as well as alter how it displays based on the item type.

void Draw()

Draws the item, as well as the field for the global value if the item represents a global editor.

void ShowImPropertyEditor()

Shows a set of ImGUI properties associated with the object.

This will call functions to draw only the property controls for the item, and nothing else. The window/container for the properties must be handled externally.

void toggleVisibility()

Toggles the item’s visibility.

void SetActive(bool _active)

Sets whether or not this item should be displayed as the active item.

Parameters
  • _active: - Whether or not this item should be displayed as active.

void HandleKeyLeft()

Called when the Left arrow is pressed.

void HandleKeyRight()

Called when the Right arrow is pressed.

void ItemTriggered()

Called when the item is activated, usually from the Enter key.

Public Members

bool active = false

Whether or not this item is active.

int menu_index_num = 0

The index of this item in the menu.

bool lock = false

Whether or not this item is locked. Used to prevent deletion while the item is being drawn.

bool deleting = false

Whether or not this item is being deleted. Used to prevent drawing while the item is being deleted.

Blam::DebugMenu::MenuItem menu_item

The data to use for this menu item.

bool useAlternateDebugMenuUnknownGlobalDisplay = false