Elaztek Developer Hub
Blamite Game Engine - blam!  00453.06.08.26.0624.blamite
The core library for the Blamite Game Engine.
BlamUIWidget_DefaultLoadScreen.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 #define CWT_LOAD_SCREEN "LOAD_SCREEN_DEFAULT"
6 
7 class BlamUIWidget_DefaultLoadScreen : public BlamUIWidget_Group, BlamEventListener
8 {
9 private:
10  static const int LOAD_ICON_TICKS = 10;
11  static const int LOAD_ICON_FRAME_COUNT = 3;
12 
13  std::string new_text = "";
14 
15  BlamUIWidget_Text* text = nullptr;
16  BlamUIWidget_BasicRectangle* background = nullptr;
17 
18  int load_icon_frame = 0;
19  char load_icon_frames[LOAD_ICON_FRAME_COUNT] = { '-', '\\', '/' };
20  int load_icon_tick = LOAD_ICON_TICKS;
21 
22 public:
25 
26  void Draw() override;
27 
28  void SetHidden(bool new_hidden) override;
29 
30  void OnTickEvent(TickEvent* event) override;
31 };
ui.h
tag_io.h
BlamUIWidget_DefaultLoadScreen::OnTickEvent
void OnTickEvent(TickEvent *event) override
Definition: BlamUIWidget_DefaultLoadScreen.cpp:95
BlamUIWidget_DefaultLoadScreen.h
Blam::Rendering::SetImGuiHiddenState
BLAM void SetImGuiHiddenState(bool hide)
Sets whether ImGUI should be hidden or not.
Definition: ogre.cpp:747
BlamUIWidget_Group
Class representing a Group widget.
Definition: ui.h:287
scenario.h
BlamUIWidget::MarkForUpdate
void MarkForUpdate()
Marks the widget as needing to be updated on the next draw call.
Definition: BlamUIWidget.cpp:436
BlamUIWidget_2DPrimitive::color
BlamColor color
The color of the widget.
Definition: ui.h:438
Blam::RenderingBGFX::GetRenderHeight
BLAM int GetRenderHeight()
Retrieves the current height of the viewport.
Definition: bgfx.cpp:428
BlamVersionStringDisplayMode::Console
@ Console
Indicates the build string should be formatted for the in-game console.
UsingBgfx
bool UsingBgfx()
Definition: bgfx.cpp:63
BlamUIWidget_BasicRectangle::solid
bool solid
Whether or not this primitive is solid, or an outline.
Definition: ui.h:472
BlamUIWidget_DefaultLoadScreen
Definition: BlamUIWidget_DefaultLoadScreen.h:7
BlamUIWidget_DefaultLoadScreen::Draw
void Draw() override
Draws the widget on-screen.
Definition: BlamUIWidget_DefaultLoadScreen.cpp:62
rendering.h
Blam::Content::Tags::GetLoadingScenarioTagPath
BLAM std::string GetLoadingScenarioTagPath()
Retrieves the tag path of the currently loading scenario tag.
Definition: scenario.cpp:278
Blam::Globals::GetGlobalAsColor
BLAM BlamColor * GetGlobalAsColor(std::string name)
Retrieves a global's value as a BlamColor.
Definition: globals.cpp:415
BlamUIWidget::SetPosition
virtual void SetPosition(BlamVector2 new_position)
Sets the position of the widget.
Definition: BlamUIWidget.cpp:412
Blam::Content::Tags::GetLastLoadingTagPath
BLAM std::string GetLastLoadingTagPath()
Retrieves the tag path of the most recent tag that started loading.
Definition: tag_io.cpp:854
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:294
BlamUIWidget::display_name
std::string display_name
The display name of the widget.
Definition: ui.h:113
BlamUIWidget_Text::color
BlamColor color
The text foreground color.
Definition: ui.h:618
BlamUIWidget::SetSize
void SetSize(BlamVector2 new_size)
Sets the size of the widget.
Definition: BlamUIWidget.cpp:405
globals.h
BlamUIWidget_BasicRectangle
Class representing a basic rectangle widget.
Definition: ui.h:469
Blam::Rendering::GetRenderHeight
BLAM int GetRenderHeight()
Retrieves the current height of the OGRE viewport.
Definition: ogre.cpp:685
engine_definitions.h
BlamUIWidget_DefaultLoadScreen::BlamUIWidget_DefaultLoadScreen
BlamUIWidget_DefaultLoadScreen(BlamUIWidget_Group *_parent)
Definition: BlamUIWidget_DefaultLoadScreen.cpp:9
BlamUIWidget_Text::text
std::string text
The text to display within this text widget.
Definition: ui.h:622
BlamUIWidget_DefaultLoadScreen::SetHidden
void SetHidden(bool new_hidden) override
Sets the hidden state of the widget.
Definition: BlamUIWidget_DefaultLoadScreen.cpp:77
BlamUIWidget_Text::shadow_color
BlamColor shadow_color
The text shadow color.
Definition: ui.h:619
CWT_LOAD_SCREEN
#define CWT_LOAD_SCREEN
Definition: BlamUIWidget_DefaultLoadScreen.h:5
BlamUIWidget::z_index
int z_index
The Z index of the widget, where higher Z orders are drawn on top.
Definition: ui.h:120
BlamUIWidget_DefaultLoadScreen::~BlamUIWidget_DefaultLoadScreen
~BlamUIWidget_DefaultLoadScreen()
Definition: BlamUIWidget_DefaultLoadScreen.cpp:57
Blam::BuildInfo::GetVersionBuildString
BLAM std::string GetVersionBuildString(BlamVersionStringDisplayMode display_mode)
Retrieves the build string of the engine.
Definition: engine_definitions.cpp:77
Blam::RenderingBGFX::GetRenderWidth
BLAM int GetRenderWidth()
Retrieves the current width of the viewport.
Definition: bgfx.cpp:423
BlamUIWidget_Text
Class representing a Text widget.
Definition: ui.h:550
BlamUIWidget::SetAnchorPosition
void SetAnchorPosition(BlamWidgetAnchor new_anchor_position)
Sets the anchor position of the widget.
Definition: BlamUIWidget.cpp:425
Blam::Rendering::GetRenderWidth
BLAM int GetRenderWidth()
Retrieves the current width of the OGRE viewport.
Definition: ogre.cpp:680