Elaztek Developer Hub
Blamite Game Engine - blam!  00406.12.10.23.1457.blamite
The core library for the Blamite Game Engine.
BlamUIWidget_DebugMenu_Item Class Reference

Class used for a debug menu UI item. More...

#include <debug_menu.h>

+ Inheritance diagram for BlamUIWidget_DebugMenu_Item:
+ Collaboration diagram for BlamUIWidget_DebugMenu_Item:

Public Member Functions

 BlamUIWidget_DebugMenu_Item (BlamDebugMenuItem _menu_item, BlamUIWidget_DebugMenu *_debug_menu_widget, BlamUIWidget_Group *parent_group)
 Constructs a new debug menu item widget. More...
 
 BlamUIWidget_DebugMenu_Item (std::string header_title, BlamUIWidget_DebugMenu *_debug_menu_widget, BlamUIWidget_Group *parent_group)
 Constructs a new debug menu item widget, configured as a header. More...
 
void Draw () override
 Draws the widget on-screen. More...
 
void UpdateMetrics () override
 Updates metrics for the widget. More...
 
void SetActive (bool _active)
 
void ShowImGuiPropertyEditor () override
 Displays an ImGUI-based property editor. More...
 
void SetHidden (bool new_hidden) override
 Sets the hidden state of the widget. More...
 
void SetPosition (BlamVector2 new_position) override
 Sets the position of the widget. More...
 
void SetIsHeader ()
 Reconfigures the widget to display as a header, rather than a standard selectable item. More...
 
bool IsHeader ()
 Checks whether or not the current item is a header or not. More...
 
void SetMenuItem (BlamDebugMenuItem _menu_item)
 Sets the debug menu item information associated with this widget. More...
 
void ConfigureHotkeyText (int index)
 Reconfigures the widget's hotkey text based on its index. More...
 
void SetSize (float scale)
 Sets the scale factor of the widget. More...
 
- Public Member Functions inherited from BlamUIWidget_Group
 BlamUIWidget_Group (BlamUIWidget_Group *_parent)
 Constructs a new group widget. More...
 
 BlamUIWidget_Group (BlamWidgetType _type, BlamUIWidget_Group *_parent)
 Constructs a new group widget. More...
 
 ~BlamUIWidget_Group ()
 
void RefreshRelativePosition () override
 Updates the relative position of the widget, relative to its parent. More...
 
void ShowImGuiEditorWindow ()
 Displays the separate ImGUI editor window for this group. More...
 
void ClearChildren ()
 Clears and destroys all child widgets within the group. More...
 
- Public Member Functions inherited from BlamUIWidget
 BlamUIWidget (BlamWidgetType type)
 Constructs a new UI widget. More...
 
 BlamUIWidget (BlamWidgetType type, BlamUIWidget_Group *_parent)
 Constructs a new UI widget. More...
 
virtual ~BlamUIWidget ()
 
BlamWidgetType GetType ()
 Retrieves the type of this widget. More...
 
void RefreshRelativePosition (int viewport_width, int viewport_height, BlamVector2 initial_position)
 Updates the relative position of the widget. More...
 
void SetSize (BlamVector2 new_size)
 Sets the size of the widget. More...
 
void SetRotation (float new_rotation)
 Sets the rotation of the widget. More...
 
void SetAnchorPosition (BlamWidgetAnchor new_anchor_position)
 Sets the anchor position of the widget. More...
 
void MarkForUpdate ()
 Marks the widget as needing to be updated on the next draw call. More...
 
BlamVector2 GetAbsolutePosition ()
 Retrieves the absolute position of the widget. More...
 
BlamWidgetAnchor GetAnchorPosition ()
 Retrieves the anchor position of the widget. More...
 
bool IsHidden ()
 Checks whether or not the widget is hidden. More...
 

Additional Inherited Members

- Public Attributes inherited from BlamUIWidget_Group
std::vector< BlamUIWidget * > children = std::vector<BlamUIWidget*>()
 The list of child widgets within this group. More...
 
bool show_bounds = false
 Whether or not to display the debug bounding box around this widget. More...
 
- Public Attributes inherited from BlamUIWidget
std::string display_name = "unnamed"
 The display name of the widget. More...
 
std::string description = ""
 An optional description of the widget. More...
 
BlamVector2 position = { 0, 0 }
 The position of the widget, relative to its parent. More...
 
BlamVector2 size = { 100, 100 }
 The size of the widget, relative to its parent. More...
 
float rotation = 0.0f
 The rotation of the widget, in degrees. More...
 
int z_index = 0
 The Z index of the widget, where higher Z orders are drawn on top. More...
 
float z_size = 1.0f
 The Z size of the widget. Mostly unused. More...
 
bool auto_update = false
 Whether or not the widget should always update every frame. More...
 
Ogre::HlmsDatablock * material = nullptr
 The datablock used by the widget, if applicable. More...
 
BlamUIWidget_Groupparent = nullptr
 The parent group of this widget, if applicable. More...
 
bool ignore_layout = false
 Whether or not this widget should ignore any layout positioning. More...
 
bool hide_in_layout = false
 Whether or not this widget should be hidden within its layout. More...
 
bool ignore_scale_factor = false
 Whether or not this widget should ignore the UI scale factor settings. More...
 
- Protected Member Functions inherited from BlamUIWidget
int GetAdjustedZIndex ()
 Retrieves the adjusted Z-index of the widget. More...
 
- Protected Attributes inherited from BlamUIWidget
BlamVector2 position_absolute = { 0, 0 }
 The absolute position of the widget on-screen. More...
 
BlamVector2 size_absolute = { 100, 100 }
 The absolute size of the widget on-screen. More...
 
bool update = false
 Whether or not the widget needs to be updated before the next draw call. More...
 
bool hidden = false
 Whether or not the widget is hidden. More...
 

Detailed Description

Class used for a debug menu UI item.

Constructor & Destructor Documentation

◆ BlamUIWidget_DebugMenu_Item() [1/2]

BlamUIWidget_DebugMenu_Item::BlamUIWidget_DebugMenu_Item ( BlamDebugMenuItem  _menu_item,
BlamUIWidget_DebugMenu _debug_menu_widget,
BlamUIWidget_Group parent_group 
)

Constructs a new debug menu item widget.

Parameters
_menu_item- The item to generate a widget for.
_debug_menu_widget- The debug menu that this item belongs to.
parent_group- The parent group of this widget.
+ Here is the call graph for this function:

◆ BlamUIWidget_DebugMenu_Item() [2/2]

BlamUIWidget_DebugMenu_Item::BlamUIWidget_DebugMenu_Item ( std::string  header_title,
BlamUIWidget_DebugMenu _debug_menu_widget,
BlamUIWidget_Group parent_group 
)

Constructs a new debug menu item widget, configured as a header.

Parameters
header_title- The title to use for this header item.
_debug_menu_widget- The debug menu that this item belongs to.
parent_group- The parent group of this widget.
+ Here is the call graph for this function:

Member Function Documentation

◆ ConfigureHotkeyText()

void BlamUIWidget_DebugMenu_Item::ConfigureHotkeyText ( int  index)

Reconfigures the widget's hotkey text based on its index.

Note
While the index displayed in the UI to the user starts with 1, the index parameter provided here should start from 0.
Parameters
index- The index of this item within the debug menu.
+ Here is the call graph for this function:

◆ Draw()

void BlamUIWidget_DebugMenu_Item::Draw ( )
overridevirtual

Draws the widget on-screen.

Reimplemented from BlamUIWidget_Group.

+ Here is the call graph for this function:

◆ IsHeader()

bool BlamUIWidget_DebugMenu_Item::IsHeader ( )

Checks whether or not the current item is a header or not.

Returns
true if this widget represents a header, otherwise returns false.

◆ SetActive()

void BlamUIWidget_DebugMenu_Item::SetActive ( bool  _active)
+ Here is the call graph for this function:

◆ SetHidden()

void BlamUIWidget_DebugMenu_Item::SetHidden ( bool  new_hidden)
overridevirtual

Sets the hidden state of the widget.

Parameters
new_hidden- Whether or not the widget should be hidden.

Reimplemented from BlamUIWidget_Group.

+ Here is the call graph for this function:

◆ SetIsHeader()

void BlamUIWidget_DebugMenu_Item::SetIsHeader ( )

Reconfigures the widget to display as a header, rather than a standard selectable item.

+ Here is the call graph for this function:

◆ SetMenuItem()

void BlamUIWidget_DebugMenu_Item::SetMenuItem ( BlamDebugMenuItem  _menu_item)

Sets the debug menu item information associated with this widget.

Parameters
_menu_item- The menu item information to associate with this widget.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetPosition()

void BlamUIWidget_DebugMenu_Item::SetPosition ( BlamVector2  new_position)
overridevirtual

Sets the position of the widget.

Parameters
new_position- The new position of the widget.

Reimplemented from BlamUIWidget.

+ Here is the call graph for this function:

◆ SetSize()

void BlamUIWidget_DebugMenu_Item::SetSize ( float  scale)

Sets the scale factor of the widget.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ShowImGuiPropertyEditor()

void BlamUIWidget_DebugMenu_Item::ShowImGuiPropertyEditor ( )
overridevirtual

Displays an ImGUI-based property editor.

Used in conjunction with the UI Editor window.

Reimplemented from BlamUIWidget_Group.

+ Here is the call graph for this function:

◆ UpdateMetrics()

void BlamUIWidget_DebugMenu_Item::UpdateMetrics ( )
overridevirtual

Updates metrics for the widget.

The term "metrics" as used in this method is generally up to an individual widget class to decide. However, in most cases, it will include position, size, rotation, and color.

Reimplemented from BlamUIWidget_Group.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: