Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
BlamUIWidget_CoordinatesDisplay.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/Tick/TickEvent.h>
6 #include <Strings/components/classes/events/events.h>
8 
9 class BlamUIWidget_CoordinatesDisplay : public BlamUIWidget, public BlamEventListener
10 {
11 private:
12  BlamUIWidget_Text* text = nullptr;
13 
14  std::string display_format = "{x} {y} {z} / {yaw} {pitch} / {speed} [{mode}]";
15  std::string label_pan_cam = "pan-cam";
16  std::string label_normal_cam = "normal";
17  std::string label_uninitialized_cam = "uninitialized";
18 
19 public:
21 
23 
24  void Draw() override;
25  void ShowImGuiPropertyEditor() override;
26  void UpdateMetrics() override;
27  void RefreshRelativePosition() override;
28 
29  void OnTickEvent(TickEvent* event) override;
30 };
Blam::Director::GetCamera
BLAM BlamDirector * GetCamera()
Retrieves the director instance.
Definition: director.cpp:31
SDLK_BACKSPACE
@ SDLK_BACKSPACE
Definition: SdlEmulationLayer.h:387
BlamUIWidget::hidden
bool hidden
Definition: ui.h:94
ui.h
BlamUIWidget_Console::ShowImGuiPropertyEditor
void ShowImGuiPropertyEditor() override
Definition: BlamUIWidget_Console.cpp:172
BlamConsoleHistoryEntry::text_element
BlamUIWidget_Text * text_element
The UI widget used for displaying the message.
Definition: console.h:14
BlamConsoleHistoryEntry::visible_ticks
int visible_ticks
The amount of ticks that the message has been visible.
Definition: console.h:18
BlamConsoleHistoryEntry::BlamConsoleHistoryEntry
BlamConsoleHistoryEntry()
Definition: BlamConsoleHistoryEntry.cpp:5
Blam::Logger::LogEvent
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:142
globals
Definition: globals.h:26
BlamUIWidget_Group
Definition: ui.h:141
Blam::Logger::GetLogLevelColor
BLAM BlamColor GetLogLevelColor(BlamLogLevel log_level)
Retrieves the BlamColor that a specific log level should display with.
Definition: aliases.cpp:12
BlamUIWidget::parent
BlamUIWidget_Group * parent
Definition: ui.h:111
BlamConsoleHistoryEntry::creation_tick
uint64_t creation_tick
The tick when this entry was created.
Definition: console.h:13
BlamUIWidget_Console::UpdateMetrics
void UpdateMetrics() override
Definition: BlamUIWidget_Console.cpp:185
BlamUIWidget_Text::character_height
int character_height
Definition: ui.h:321
BlamUIWidget_Console::~BlamUIWidget_Console
~BlamUIWidget_Console()
Definition: BlamUIWidget_Console.cpp:61
imgui.h
console.h
BlamUIWidget_Console::OnCharacterInputEvent
void OnCharacterInputEvent(CharacterInputEvent *event) override
Definition: BlamUIWidget_Console.cpp:378
BlamConsoleCommand
Class used to represent a console command.
Definition: console.h:56
Console
@ Console
Console widget.
Definition: render_stack.h:77
BlamWidgetAnchor::BottomLeft
@ BottomLeft
The widget will be placed at the bottom-left of the screen.
BlamUIWidget_Text::SetHidden
void SetHidden(bool new_hidden) override
Definition: text.cpp:588
SDLK_UP
@ SDLK_UP
Definition: SdlEmulationLayer.h:485
director.h
Blam::Tick::MaxTicksPerSecond
BLAM int MaxTicksPerSecond()
Retrieves the maximum number of ticks per second.
Definition: tick.cpp:152
console.h
BlamUIWidget_Console::PrintAsColumns
void PrintAsColumns(std::vector< std::string > items)
Displays a list of strings within the console column display.
Definition: BlamUIWidget_Console.cpp:690
rendering.h
BlamUIWidget_Console::BlamUIWidget_Console
BlamUIWidget_Console(BlamUIWidget_Group *_parent)
Constructs a new console widget.
Definition: BlamUIWidget_Console.cpp:16
BlamUIWidget_Text::ShowImGuiPropertyEditor
void ShowImGuiPropertyEditor() override
Definition: text.cpp:168
BlamConsoleHistoryEntry::~BlamConsoleHistoryEntry
~BlamConsoleHistoryEntry()
Definition: BlamConsoleHistoryEntry.cpp:17
BlamDirector::vertical_angle
float vertical_angle
Definition: director.h:106
BlamUIWidget_CoordinatesDisplay::UpdateMetrics
void UpdateMetrics() override
Definition: BlamUIWidget_CoordinatesDisplay.cpp:50
BlamUIWidget_CoordinatesDisplay::ShowImGuiPropertyEditor
void ShowImGuiPropertyEditor() override
Definition: BlamUIWidget_CoordinatesDisplay.cpp:45
BlamUIWidget_Console::RefreshRelativePosition
void RefreshRelativePosition() override
Definition: BlamUIWidget_Console.cpp:223
Blam::Globals::GetGlobalAsColor
BLAM BlamColor * GetGlobalAsColor(std::string name)
Retrieves a global's value as a BlamColor.
Definition: globals.cpp:419
BlamUIWidget::SetPosition
virtual void SetPosition(BlamVector2 new_position)
Definition: BlamUIWidget.cpp:330
SDLK_RETURN
@ SDLK_RETURN
Definition: SdlEmulationLayer.h:385
BlamUIWidget_Text::UpdateMetrics
void UpdateMetrics() override
Definition: text.cpp:194
ImGui::CollapsingHeader
IMGUI_API bool CollapsingHeader(const char *label, ImGuiTreeNodeFlags flags=0)
Definition: imgui_widgets.cpp:5422
tick.h
Blam::Globals::EngineGlobal
Structure containing data for a game engine global.
Definition: globals.h:64
BlamDirector::horizontal_angle
float horizontal_angle
Definition: director.h:105
BlamUIWidget_Text::Draw
void Draw() override
Definition: text.cpp:115
BlamWidgetAnchor::TopLeft
@ TopLeft
The widget will be placed at the top-left of the screen.
BlamUIWidget_Console::Draw
void Draw() override
Definition: BlamUIWidget_Console.cpp:89
BlamUIWidget::display_name
std::string display_name
Definition: ui.h:99
Blam::Tick::GetTotalRuntimeTicks
BLAM uint64_t GetTotalRuntimeTicks()
Gets the total amount of ticks that have elapsed during program runtime.
Definition: tick.cpp:177
BlamUIWidget_Text::color
BlamColor color
Definition: ui.h:323
BlamUIWidget::SetSize
void SetSize(BlamVector2 new_size)
Definition: BlamUIWidget.cpp:323
format
ARPHIC PUBLIC LICENSE Ltd Yung Chi Taiwan All rights reserved except as specified below Everyone is permitted to copy and distribute verbatim copies of this license but changing it is forbidden Preamble The licenses for most software are designed to take away your freedom to share and change it By the ARPHIC PUBLIC LICENSE specifically permits and encourages you to use this provided that you give the recipients all the rights that we gave you and make sure they can get the modifications of this software Legal Terms Font means the TrueType fonts AR PL Mingti2L AR PL KaitiM AR PL KaitiM and the derivatives of those fonts created through any modification including modifying reordering converting format
Definition: ARPHICPL.TXT:16
SDLK_RIGHT
@ SDLK_RIGHT
Definition: SdlEmulationLayer.h:482
Blam::Resources::Console::RunCommandLine
BLAM HRESULT RunCommandLine(std::string command_line)
Executed the provided string as a console command.
Definition: console.cpp:271
BlamConsoleHistoryEntry::Reconfigure
void Reconfigure(BlamLogMessage _message)
Reconfigures this console history entry.
Definition: BlamConsoleHistoryEntry.cpp:23
BlamConsoleHistoryEntry::opacity
byte opacity
The opacity of the message text.
Definition: console.h:15
BlamUIWidget_CoordinatesDisplay::Draw
void Draw() override
Definition: BlamUIWidget_CoordinatesDisplay.cpp:39
BlamDirector::speed
float speed
The camera's current speed.
Definition: director.h:88
globals.h
BlamUIWidget_Console::ClearOutput
void ClearOutput()
Clears the console output.
Definition: BlamUIWidget_Console.cpp:779
it
ARPHIC PUBLIC LICENSE Ltd Yung Chi Taiwan All rights reserved except as specified below Everyone is permitted to copy and distribute verbatim copies of this license but changing it is forbidden Preamble The licenses for most software are designed to take away your freedom to share and change it By the ARPHIC PUBLIC LICENSE specifically permits and encourages you to use this provided that you give the recipients all the rights that we gave you and make sure they can get the modifications of this software Legal Terms Font means the TrueType fonts AR PL Mingti2L AR PL KaitiM AR PL KaitiM and the derivatives of those fonts created through any modification including modifying reordering converting changing font or adding deleting some characters in from glyph table PL means Public License Copyright Holder means whoever is named in the copyright or copyrights for the Font You means the or person redistributing or modifying the Font Freely Available means that you have the freedom to copy or modify the Font as well as redistribute copies of the Font under the same conditions you not price If you you can charge for this service Copying &Distribution You may copy and distribute verbatim copies of this Font in any without provided that you retain this license including modifying reordering converting changing font or adding deleting some characters in from glyph and copy and distribute such modifications under the terms of Section provided that the following conditions are such as by offering access to copy the modifications from a designated or distributing the modifications on a medium customarily used for software interchange c If the modified fonts normally reads commands interactively when you must cause it
Definition: ARPHICPL.TXT:36
Blam::Resources::Console::GetCommandList
BLAM std::map< std::string, BlamConsoleCommand * > GetCommandList()
Retrieves the list of all loaded console commands.
Definition: console.cpp:237
BlamDirector
Class representing the Director.
Definition: director.h:27
BlamUIWidget
Definition: ui.h:82
SDLK_LEFT
@ SDLK_LEFT
Definition: SdlEmulationLayer.h:483
SDLK_DOWN
@ SDLK_DOWN
Definition: SdlEmulationLayer.h:484
Blam::Globals::GetGlobalsList
BLAM std::map< std::string, EngineGlobal > * GetGlobalsList()
Retrieves the list of loaded globals.
Definition: globals.cpp:22
BlamUIWidget_CoordinatesDisplay::BlamUIWidget_CoordinatesDisplay
BlamUIWidget_CoordinatesDisplay(BlamUIWidget_Group *_parent)
Definition: BlamUIWidget_CoordinatesDisplay.cpp:12
BlamWidgetType::CoordinatesDisplay
@ CoordinatesDisplay
Special widget. Used for the coordinates display.
BlamUIWidget_Text::text
std::string text
Definition: ui.h:327
BlamConsoleHistoryEntry::Deconfigure
void Deconfigure()
Deconfigures this console history entry.
Definition: BlamConsoleHistoryEntry.cpp:36
BlamUIWidget::RefreshRelativePosition
virtual void RefreshRelativePosition()
Definition: BlamUIWidget.cpp:185
BlamUIWidget::description
std::string description
Definition: ui.h:100
SDLK_TAB
@ SDLK_TAB
Definition: SdlEmulationLayer.h:388
x
config GlyphExtraSpacing x
Definition: README.txt:30
BlamUIWidget_Text::shadow_color
BlamColor shadow_color
Definition: ui.h:324
BlamRendering::OGRE::GetRenderWidth
BLAM int GetRenderWidth()
Definition: ogre.cpp:370
BlamUIWidget::IsHidden
bool IsHidden()
Definition: BlamUIWidget.cpp:382
BlamUIWidget_Console::OnLogMessageEvent
void OnLogMessageEvent(LogMessageEvent *event) override
Definition: BlamUIWidget_Console.cpp:475
Blam::Logger::LogEventForce
BLAM void LogEventForce(std::string message)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:274
BlamUIWidget_CoordinatesDisplay
Definition: BlamUIWidget_CoordinatesDisplay.h:9
BlamConsoleHistoryEntry
Class representing a console history entry.
Definition: console.h:10
BlamWidgetType
BlamWidgetType
Enumerator listing possible UI widget types.
Definition: ui.h:60
BlamUIWidget_CoordinatesDisplay.h
BlamUIWidget::auto_update
bool auto_update
Definition: ui.h:108
BlamDirector::pancam
bool pancam
Whether or not the camera is currently in pan-cam mode. Pan-cam locks Z movement of the camera when n...
Definition: director.h:92
BlamUIWidget_CoordinatesDisplay::~BlamUIWidget_CoordinatesDisplay
~BlamUIWidget_CoordinatesDisplay()
Definition: BlamUIWidget_CoordinatesDisplay.cpp:33
BlamUIWidget_CoordinatesDisplay::OnTickEvent
void OnTickEvent(TickEvent *event) override
Definition: BlamUIWidget_CoordinatesDisplay.cpp:64
BlamUIWidget_Console::OnTickEvent
void OnTickEvent(TickEvent *event) override
Definition: BlamUIWidget_Console.cpp:408
BlamUIWidget_CoordinatesDisplay::RefreshRelativePosition
void RefreshRelativePosition() override
Definition: BlamUIWidget_CoordinatesDisplay.cpp:59
BlamDirector::camera_pos
BlamVector3 camera_pos
The current position of the camera.
Definition: director.h:77
Blam::Globals::GetGlobalAsBoolean
BLAM bool * GetGlobalAsBoolean(std::string name)
Retrieves a global's value as a boolean.
Definition: globals.cpp:347
BlamConsoleHistoryEntry::message
BlamLogMessage message
The message that this entry is displaying.
Definition: console.h:16
BlamUIWidget_Text
Definition: ui.h:293
name
ARPHIC PUBLIC LICENSE Ltd Yung Chi Taiwan All rights reserved except as specified below Everyone is permitted to copy and distribute verbatim copies of this license but changing it is forbidden Preamble The licenses for most software are designed to take away your freedom to share and change it By the ARPHIC PUBLIC LICENSE specifically permits and encourages you to use this provided that you give the recipients all the rights that we gave you and make sure they can get the modifications of this software Legal Terms Font means the TrueType fonts AR PL Mingti2L AR PL KaitiM AR PL KaitiM and the derivatives of those fonts created through any modification including modifying reordering converting changing font name
Definition: ARPHICPL.TXT:16
BlamUIWidget_Console::OnKeyPressEvent
void OnKeyPressEvent(KeyPressEvent *event) override
Definition: BlamUIWidget_Console.cpp:241
BlamUIWidget::SetAnchorPosition
void SetAnchorPosition(BlamWidgetAnchor new_anchor_position)
Definition: BlamUIWidget.cpp:343