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

Class for the console UI widget. More...

#include <console.h>

+ Inheritance diagram for BlamUIWidget_Console:
+ Collaboration diagram for BlamUIWidget_Console:

Public Member Functions

 BlamUIWidget_Console (BlamUIWidget_Group *_parent)
 Constructs a new console widget. More...
 
 ~BlamUIWidget_Console ()
 
void Draw () override
 
void ShowImGuiPropertyEditor () override
 
void UpdateMetrics () override
 
void RefreshRelativePosition () override
 
void OnKeyPressEvent (KeyPressEvent *event) override
 
void OnCharacterInputEvent (CharacterInputEvent *event) override
 
void OnTickEvent (TickEvent *event) override
 
void OnLogMessageEvent (LogMessageEvent *event) override
 
void PrintAsColumns (std::vector< std::string > items)
 Displays a list of strings within the console column display. More...
 
void PrintAsColumns (std::vector< BlamLogMessage > items)
 Displays a list of log messages within the console column display. More...
 
void ClearOutput ()
 Clears the console output. More...
 
- Public Member Functions inherited from BlamUIWidget
 BlamUIWidget (BlamWidgetType type)
 
 BlamUIWidget (BlamWidgetType type, BlamUIWidget_Group *_parent)
 
virtual ~BlamUIWidget ()
 
BlamWidgetType GetType ()
 
void RefreshRelativePosition (int viewport_width, int viewport_height, BlamVector2 initial_position)
 
void SetSize (BlamVector2 new_size)
 
virtual void SetPosition (BlamVector2 new_position)
 
void SetRotation (float new_rotation)
 
void SetAnchorPosition (BlamWidgetAnchor new_anchor_position)
 
void MarkForUpdate ()
 
BlamVector2 GetAbsolutePosition ()
 
BlamWidgetAnchor GetAnchorPosition ()
 
virtual void SetHidden (bool new_hidden)
 
bool IsHidden ()
 

Additional Inherited Members

- Public Attributes inherited from BlamUIWidget
std::string display_name = "unnamed"
 
std::string description = ""
 
BlamVector2 position = { 0, 0 }
 
BlamVector2 size = { 100, 100 }
 
float rotation = 0.0f
 
int z_index = 0
 
float z_size = 1.0f
 
bool auto_update = false
 
Ogre::HlmsDatablock * material = nullptr
 
BlamUIWidget_Groupparent = nullptr
 
bool ignore_layout = false
 
bool hide_in_layout = false
 
- Protected Member Functions inherited from BlamUIWidget
int GetAdjustedZIndex ()
 
- Protected Attributes inherited from BlamUIWidget
BlamVector2 position_absolute = { 0, 0 }
 
BlamVector2 size_absolute = { 100, 100 }
 
bool update = false
 
bool hidden = false
 

Detailed Description

Class for the console UI widget.

The console allows for direct interaction with the engine through console commands. Additionally, it allows for direct execution of script functions and modification of script variables.

Constructor & Destructor Documentation

◆ BlamUIWidget_Console()

BlamUIWidget_Console::BlamUIWidget_Console ( BlamUIWidget_Group _parent)

Constructs a new console widget.

Parameters
_parent- The parent of this widget. Should always be the UI root.
+ Here is the call graph for this function:

◆ ~BlamUIWidget_Console()

BlamUIWidget_Console::~BlamUIWidget_Console ( )

Member Function Documentation

◆ ClearOutput()

void BlamUIWidget_Console::ClearOutput ( )

Clears the console output.

Will clear both log message history as well as column content.

+ Here is the call graph for this function:

◆ Draw()

void BlamUIWidget_Console::Draw ( )
overridevirtual

Reimplemented from BlamUIWidget.

+ Here is the call graph for this function:

◆ OnCharacterInputEvent()

void BlamUIWidget_Console::OnCharacterInputEvent ( CharacterInputEvent *  event)
override

◆ OnKeyPressEvent()

void BlamUIWidget_Console::OnKeyPressEvent ( KeyPressEvent *  event)
override
+ Here is the call graph for this function:

◆ OnLogMessageEvent()

void BlamUIWidget_Console::OnLogMessageEvent ( LogMessageEvent *  event)
override
+ Here is the call graph for this function:

◆ OnTickEvent()

void BlamUIWidget_Console::OnTickEvent ( TickEvent *  event)
override
+ Here is the call graph for this function:

◆ PrintAsColumns() [1/2]

void BlamUIWidget_Console::PrintAsColumns ( std::vector< BlamLogMessage >  items)

Displays a list of log messages within the console column display.

Each item will be displayed from the top-left to the bottom-right, occupying as many rows as needed to display all items unless the amount of items exceeds the number of rows - in which case as many items will be shown, and the remainder will not be displayed. The amount of items that can be shown depeneds on the amount of console lines and the maximum amount of columns.

This method can be used to display messages with color information. No other log message information is used.

Parameters
items- The items to display within the columns.
+ Here is the call graph for this function:

◆ PrintAsColumns() [2/2]

void BlamUIWidget_Console::PrintAsColumns ( std::vector< std::string >  items)

Displays a list of strings within the console column display.

Each item will be displayed from the top-left to the bottom-right, occupying as many rows as needed to display all items unless the amount of items exceeds the number of rows - in which case as many items will be shown, and the remainder will not be displayed. The amount of items that can be shown depeneds on the amount of console lines and the maximum amount of columns.

Parameters
items- The items to display within the columns.
+ Here is the call graph for this function:

◆ RefreshRelativePosition()

void BlamUIWidget_Console::RefreshRelativePosition ( )
overridevirtual

Reimplemented from BlamUIWidget.

+ Here is the call graph for this function:

◆ ShowImGuiPropertyEditor()

void BlamUIWidget_Console::ShowImGuiPropertyEditor ( )
overridevirtual

Reimplemented from BlamUIWidget.

+ Here is the call graph for this function:

◆ UpdateMetrics()

void BlamUIWidget_Console::UpdateMetrics ( )
overridevirtual

Reimplemented from BlamUIWidget.

+ 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: