Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
BlamUIWidget_FramerateDisplay.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_FramerateDisplay : public BlamUIWidget, public BlamEventListener
10 {
11 private:
12  BlamUIWidget_Text* text = nullptr;
13 
14  std::string display_format = "[{last}] {avg}\n{thread_mode}";
15  bool needs_update = false;
16 
17 public:
19 
21 
22  void Draw() override;
23  void ShowImGuiPropertyEditor() override;
24  void UpdateMetrics() override;
25  void RefreshRelativePosition() override;
26 
27  void OnTickEvent(TickEvent* event) override;
28 };
ui.h
BlamUIWidget_FramerateDisplay::UpdateMetrics
void UpdateMetrics() override
Definition: BlamUIWidget_FramerateDisplay.cpp:53
BlamUIWidget_FramerateDisplay::ShowImGuiPropertyEditor
void ShowImGuiPropertyEditor() override
Definition: BlamUIWidget_FramerateDisplay.cpp:48
BlamUIWidget_Group
Definition: ui.h:141
BlamUIWidget::parent
BlamUIWidget_Group * parent
Definition: ui.h:111
BlamRendering::OGRE::GetGraphicsSystem
BLAM Demo::GraphicsSystem * GetGraphicsSystem()
Definition: ogre.cpp:343
imgui.h
BlamUIWidget_Text::SetHidden
void SetHidden(bool new_hidden) override
Definition: text.cpp:588
BlamWidgetAnchor::BottomRight
@ BottomRight
The widget will be placed at the bottom-right of the screen.
rendering.h
BlamUIWidget_Text::ShowImGuiPropertyEditor
void ShowImGuiPropertyEditor() override
Definition: text.cpp:168
BlamUIWidget::SetPosition
virtual void SetPosition(BlamVector2 new_position)
Definition: BlamUIWidget.cpp:330
BlamUIWidget_Text::UpdateMetrics
void UpdateMetrics() override
Definition: text.cpp:194
BlamUIWidget_Text::Draw
void Draw() override
Definition: text.cpp:115
BlamUIWidget_FramerateDisplay
Definition: BlamUIWidget_FramerateDisplay.h:9
BlamUIWidget::display_name
std::string display_name
Definition: ui.h:99
BlamUIWidget_Text::color
BlamColor color
Definition: ui.h: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
BlamUIWidget_FramerateDisplay::RefreshRelativePosition
void RefreshRelativePosition() override
Definition: BlamUIWidget_FramerateDisplay.cpp:59
BlamUIWidget_FramerateDisplay.h
BlamUIWidget_FramerateDisplay::OnTickEvent
void OnTickEvent(TickEvent *event) override
Definition: BlamUIWidget_FramerateDisplay.cpp:64
globals.h
BlamUIWidget_FramerateDisplay::~BlamUIWidget_FramerateDisplay
~BlamUIWidget_FramerateDisplay()
Definition: BlamUIWidget_FramerateDisplay.cpp:30
BlamUIWidget_FramerateDisplay::Draw
void Draw() override
Definition: BlamUIWidget_FramerateDisplay.cpp:36
BlamUIWidget
Definition: ui.h:82
BlamUIWidget_Text::text
std::string text
Definition: ui.h:327
BlamUIWidget::RefreshRelativePosition
virtual void RefreshRelativePosition()
Definition: BlamUIWidget.cpp:185
BlamUIWidget::description
std::string description
Definition: ui.h:100
BlamWidgetType::FramerateDisplay
@ FramerateDisplay
Special widget. Used for the framerate display.
BlamUIWidget_FramerateDisplay::BlamUIWidget_FramerateDisplay
BlamUIWidget_FramerateDisplay(BlamUIWidget_Group *_parent)
Definition: BlamUIWidget_FramerateDisplay.cpp:13
BlamUIWidget::IsHidden
bool IsHidden()
Definition: BlamUIWidget.cpp:382
BlamWidgetType
BlamWidgetType
Enumerator listing possible UI widget types.
Definition: ui.h:60
Demo::GraphicsSystem::getRoot
Ogre::Root * getRoot(void) const
Definition: GraphicsSystem.h:144
Blam::Globals::GetGlobalAsBoolean
BLAM bool * GetGlobalAsBoolean(std::string name)
Retrieves a global's value as a boolean.
Definition: globals.cpp:347
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::SetAnchorPosition
void SetAnchorPosition(BlamWidgetAnchor new_anchor_position)
Definition: BlamUIWidget.cpp:343