Elaztek Developer Hub
Blamite Game Engine - blam!  00423.10.27.24.0533.blamite
The core library for the Blamite Game Engine.
uid_cypher.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <thread>
4 
5 #include <Strings/components/classes/events/game_engine_events/NewFrame/NewFrameEvent.h>
6 #include <Strings/components/classes/events/events.h>
8 
21 class BlamUIWidget_UserIDCypher : public BlamUIWidget, public BlamEventListener
22 {
23 private:
24  BlamUIWidget_Text* text = nullptr;
25 
26 public:
33 
38 
39  void Draw() override;
40  void ShowImGuiPropertyEditor() override;
41  void UpdateMetrics() override;
42  void RefreshRelativePosition() override;
43 
44  void OnTickEvent(TickEvent* event) override;
45 };
BlamUIWidget::hidden
bool hidden
Whether or not the widget is hidden.
Definition: ui.h:109
BlamDebugMenuItem::title
std::string title
The title of the debug menu item as shown in the menu.
Definition: debug_menu.h:41
BlamUIWidget_UserIDCypher::~BlamUIWidget_UserIDCypher
~BlamUIWidget_UserIDCypher()
Destroys the user ID cypher widget.
Definition: BlamUIWidget_UserIDCypher.cpp:26
ui.h
Blam::Settings::Config::GetEngineConfiguration
BLAM BlamConfigurationFile * GetEngineConfiguration()
Retrieves the main engine configuration file.
Definition: config.cpp:60
BlamUIWidget_DebugMenu::menu_item_size
BlamVector2 menu_item_size
The size of each debug menu item widget.
Definition: debug_menu.h:197
BlamUIWidget::update
bool update
Whether or not the widget needs to be updated before the next draw call.
Definition: ui.h:108
Blam::Globals::GlobalExists
BLAM bool GlobalExists(std::string id)
Determines whether or not a global exists.
Definition: globals.cpp:27
uid_cypher.h
BlamDebugMenuItem_Global::global_id
std::string global_id
The ID of the engine global to update.
Definition: debug_menu.h:125
BlamUIWidget_Group
Class representing a Group widget.
Definition: ui.h:265
String
@ String
Represents a std::string.
Definition: globals.h:29
BlamDebugMenuItemType::Submenu
@ Submenu
Enters into a submenu/subscreen upon activation.
BlamUIWidget::MarkForUpdate
void MarkForUpdate()
Marks the widget as needing to be updated on the next draw call.
Definition: BlamUIWidget.cpp:392
Blam::User::GetUserID
BLAM uint32_t GetUserID()
Definition: user.cpp:3
BlamUIWidget_DebugMenu_Item::ConfigureHotkeyText
void ConfigureHotkeyText(int index)
Reconfigures the widget's hotkey text based on its index.
Definition: debug_menu_item.cpp:317
BlamUIWidget::parent
BlamUIWidget_Group * parent
The parent group of this widget, if applicable.
Definition: ui.h:132
imgui.h
BlamUIWidget_DebugMenu::GetAnimatedActiveItemBackground
BlamColor GetAnimatedActiveItemBackground()
Retrieves the animating active item background color.
Definition: debug_menu.cpp:542
BlamUIWidget_2DPrimitive::color
BlamColor color
The color of the widget.
Definition: ui.h:373
Boolean
@ Boolean
Represents a boolean. Can be true or false.
Definition: globals.h:24
BlamUIWidget_DebugMenu::cached_scale_factor
float cached_scale_factor
The current cached UI scale factor. Used to automatically scale the UI when the scale factor is chang...
Definition: debug_menu.h:196
BlamUIWidget_Text::SetHidden
void SetHidden(bool new_hidden) override
Sets the hidden state of the widget.
Definition: text.cpp:452
BlamEngineGlobal::boolean_value
bool boolean_value
The boolean value of the global.
Definition: globals.h:56
BlamUIWidget_Group::UpdateMetrics
void UpdateMetrics() override
Updates metrics for the widget.
Definition: group.cpp:155
BlamUIWidget_DebugMenu_Item::UpdateMetrics
void UpdateMetrics() override
Updates metrics for the widget.
Definition: debug_menu_item.cpp:167
BlamUIWidget_Group::Draw
void Draw() override
Draws the widget on-screen.
Definition: group.cpp:51
BlamUIWidget_Text::ShowImGuiPropertyEditor
void ShowImGuiPropertyEditor() override
Displays an ImGUI-based property editor.
Definition: text.cpp:71
BlamUIWidget_DebugMenu_Item::Draw
void Draw() override
Draws the widget on-screen.
Definition: debug_menu_item.cpp:154
BlamUIWidget_DebugMenu_Item::SetHidden
void SetHidden(bool new_hidden) override
Sets the hidden state of the widget.
Definition: debug_menu_item.cpp:356
BlamWidgetType::UIDCypher
@ UIDCypher
Special widget. Used for the user ID cypher.
BlamUIWidget::SetPosition
virtual void SetPosition(BlamVector2 new_position)
Sets the position of the widget.
Definition: BlamUIWidget.cpp:368
BlamUIWidget::ShowImGuiPropertyEditor
virtual void ShowImGuiPropertyEditor()
Displays an ImGUI-based property editor.
Definition: BlamUIWidget.cpp:57
BlamUIWidget_UserIDCypher::OnTickEvent
void OnTickEvent(TickEvent *event) override
Definition: BlamUIWidget_UserIDCypher.cpp:52
BlamEngineGlobal::type
BlamGlobalType type
The type of the global.
Definition: globals.h:46
BlamUIWidget_Text::UpdateMetrics
void UpdateMetrics() override
Updates metrics for the widget.
Definition: text.cpp:97
ImGui::CollapsingHeader
IMGUI_API bool CollapsingHeader(const char *label, ImGuiTreeNodeFlags flags=0)
Definition: imgui_widgets.cpp:5422
BlamUIWidget_Text::Draw
void Draw() override
Draws the widget on-screen.
Definition: text.cpp:52
BlamWidgetAnchor::TopLeft
@ TopLeft
The widget will be placed at the top-left of the screen.
BlamUIWidget_Group::children
std::vector< BlamUIWidget * > children
The list of child widgets within this group.
Definition: ui.h:272
BlamUIWidget::display_name
std::string display_name
The display name of the widget.
Definition: ui.h:120
BlamUIWidget_Text::color
BlamColor color
The text foreground color.
Definition: ui.h:524
BlamUIWidget_2DPrimitive::SetHidden
void SetHidden(bool new_hidden) override
Sets the hidden state of the widget.
Definition: 2d_primitive.cpp:173
BlamUIWidget::SetSize
void SetSize(BlamVector2 new_size)
Sets the size of the widget.
Definition: BlamUIWidget.cpp:361
BlamWidgetType::DebugMenuItem
@ DebugMenuItem
Special widget. Represents an item within the debug menu.
BlamDebugMenuItemType::CommandSequence
@ CommandSequence
Runs a sequence of console commands upon activation.
BlamUIWidget_DebugMenu_Item::SetIsHeader
void SetIsHeader()
Reconfigures the widget to display as a header, rather than a standard selectable item.
Definition: debug_menu_item.cpp:286
BlamUIWidget_DebugMenu::GetHotkeyCharacterFromIndex
char GetHotkeyCharacterFromIndex(int index)
Determines the hotkey character for an item at a given index.
Definition: debug_menu.cpp:558
BlamUIWidget_UserIDCypher::RefreshRelativePosition
void RefreshRelativePosition() override
Updates the relative position of the widget, relative to its parent.
Definition: BlamUIWidget_UserIDCypher.cpp:47
BlamUIWidget_DebugMenu_Item::SetMenuItem
void SetMenuItem(BlamDebugMenuItem *_menu_item)
Sets the debug menu item information associated with this widget.
Definition: debug_menu_item.cpp:297
BlamEngineGlobal
Structure containing data for a game engine global.
Definition: globals.h:44
BlamDebugMenuItemType::Global
@ Global
Modifies an engine global upon activation.
globals.h
BlamUIWidget_DebugMenu_Item::ShowImGuiPropertyEditor
void ShowImGuiPropertyEditor() override
Displays an ImGUI-based property editor.
Definition: debug_menu_item.cpp:254
BlamUIWidget_DebugMenu_Item::SetSize
void SetSize(float scale)
Sets the scale factor of the widget.
Definition: debug_menu_item.cpp:344
uint32_t
unsigned int uint32_t
Definition: stdint.h:17
BlamDebugMenuItem
Class representing a debug menu item.
Definition: debug_menu.h:35
BlamUIWidget_BasicRectangle
Class representing a basic rectangle widget.
Definition: ui.h:404
BlamUIWidget_UserIDCypher::UpdateMetrics
void UpdateMetrics() override
Updates metrics for the widget.
Definition: BlamUIWidget_UserIDCypher.cpp:42
BlamUIWidget_UserIDCypher::BlamUIWidget_UserIDCypher
BlamUIWidget_UserIDCypher(BlamUIWidget_Group *_parent)
Constructs a new user ID cypher widget.
Definition: BlamUIWidget_UserIDCypher.cpp:10
BlamUIWidget
Base class for a UI widget.
Definition: ui.h:89
Blam::Globals::GetGlobal
BLAM BlamEngineGlobal * GetGlobal(std::string name)
Retrieves a global with the specified ID.
Definition: globals.cpp:189
BlamUIWidget_UserIDCypher
UI widget for the user ID cypher display.
Definition: uid_cypher.h:21
BlamDebugMenuItemType::Command
@ Command
Runs a console command upon activation.
BlamUIWidget_2DPrimitive::UpdateMetrics
void UpdateMetrics() override
Updates metrics for the widget.
Definition: 2d_primitive.cpp:131
debug_menu.h
BlamDebugMenuItem::GetType
BlamDebugMenuItemType GetType()
Retrieves the type of the debug menu item.
Definition: BlamDebugMenuItem.cpp:8
BlamUIWidget_DebugMenu
Class used for the Debug Menu UI.
Definition: debug_menu.h:119
BlamUIWidget_Text::text
std::string text
The text to display within this text widget.
Definition: ui.h:528
BlamUIWidget::RefreshRelativePosition
virtual void RefreshRelativePosition()
Updates the relative position of the widget, relative to its parent.
Definition: BlamUIWidget.cpp:212
BlamUIWidget::description
std::string description
An optional description of the widget.
Definition: ui.h:121
BlamUIWidget_DebugMenu_Item::SetActive
void SetActive(bool _active)
Definition: debug_menu_item.cpp:248
user.h
BlamUIWidget::z_index
int z_index
The Z index of the widget, where higher Z orders are drawn on top.
Definition: ui.h:127
BlamUIWidget_DebugMenu_Item::IsHeader
bool IsHeader()
Checks whether or not the current item is a header or not.
Definition: debug_menu_item.cpp:292
ImGui::Separator
IMGUI_API void Separator()
Definition: imgui_widgets.cpp:1284
BlamWidgetType
BlamWidgetType
Enumerator listing possible UI widget types.
Definition: ui.h:60
config.h
BlamUIWidget_DebugMenu_Item::SetPosition
void SetPosition(BlamVector2 new_position) override
Sets the position of the widget.
Definition: debug_menu_item.cpp:338
BlamUIWidget_UserIDCypher::ShowImGuiPropertyEditor
void ShowImGuiPropertyEditor() override
Displays an ImGUI-based property editor.
Definition: BlamUIWidget_UserIDCypher.cpp:37
BlamUIWidget_BasicRectangle::ShowImGuiPropertyEditor
void ShowImGuiPropertyEditor() override
Displays an ImGUI-based property editor.
Definition: rectangle.cpp:57
BlamDebugMenuItem_Global
Class representing a global debug menu item.
Definition: debug_menu.h:122
BlamUIWidget::ignore_scale_factor
bool ignore_scale_factor
Whether or not this widget should ignore the UI scale factor settings.
Definition: ui.h:135
BlamUIWidget_UserIDCypher::Draw
void Draw() override
Draws the widget on-screen.
Definition: BlamUIWidget_UserIDCypher.cpp:32
BlamUIWidget_Group::SetHidden
void SetHidden(bool new_hidden) override
Sets the hidden state of the widget.
Definition: group.cpp:170
BlamUIWidget_DebugMenu_Item::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.
Definition: debug_menu_item.cpp:7
BlamEngineGlobal::value_raw
std::string value_raw
The raw value of the global as a string.
Definition: globals.h:49
BlamWidgetAnchor::TopRight
@ TopRight
The widget will be placed at the top-right of the screen.
BlamUIWidget_Text
Class representing a Text widget.
Definition: ui.h:485
BlamUIWidget::SetAnchorPosition
void SetAnchorPosition(BlamWidgetAnchor new_anchor_position)
Sets the anchor position of the widget.
Definition: BlamUIWidget.cpp:381