Elaztek Developer Hub
Blamite Game Engine - blam!  00406.12.10.23.1457.blamite
The core library for the Blamite Game Engine.
ui.h File Reference
#include <Strings/components/resources/color/BlamColor.h>
#include <OGRE/Overlay/OgreTextAreaOverlayElement.h>
#include <OGRE/Overlay/OgreOverlayContainer.h>
#include <OGRE/Overlay/OgrePanelOverlayElement.h>
#include <OGRE/Overlay/OgreOverlay.h>
#include <OGRE/OgreManualObject2.h>
#include <OGRE/OgreSceneManager.h>
#include <vector>
#include <string>
#include "components/core/world/world.h"
#include "components/content/tags/classes/cui_screen.h"
#include "components/content/fonts/fonts.h"
+ Include dependency graph for ui.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BlamUIWidget
 Base class for a UI widget. More...
 
class  BlamUIWidget_Group
 Class representing a Group widget. More...
 
class  BlamUIWidget_VLayoutGroup
 Class representing a Vertical Layout Group widget. More...
 
class  BlamUIWidget_2DPrimitive
 Base class for 2D primitive widgets. More...
 
class  BlamUIWidget_BasicRectangle
 Class representing a basic rectangle widget. More...
 
class  BlamUIWidget_BasicEllipse
 Class representing a basic ellipse widget. More...
 
class  BlamUIWidget_BasicLine
 Class representing a basic line widget. More...
 
class  BlamUIWidget_BasicTriangle
 Class representing a basic triangle widget. More...
 
class  BlamUIWidget_Text
 Class representing a Text widget. More...
 

Namespaces

 Blam
 Namespace surrounding all major engine components.
 
 Blam::UI
 Namespace containing functions relating to the Blamite UI system.
 

Macros

#define BLAM
 

Enumerations

enum  BlamWidgetAnchor : uint8_t {
  BlamWidgetAnchor::TopCenter, BlamWidgetAnchor::Center, BlamWidgetAnchor::BottomCenter, BlamWidgetAnchor::TopLeft,
  BlamWidgetAnchor::CenterLeft, BlamWidgetAnchor::BottomLeft, BlamWidgetAnchor::TopRight, BlamWidgetAnchor::CenterRight,
  BlamWidgetAnchor::BottomRight, BlamWidgetAnchor::TopFill, BlamWidgetAnchor::LeftFill, BlamWidgetAnchor::RightFill,
  BlamWidgetAnchor::BottomFill, BlamWidgetAnchor::Fill
}
 Enumerator listing possible widget anchor positions. More...
 
enum  BlamWidgetType {
  BlamWidgetType::Basic_Rectangle, BlamWidgetType::Basic_Ellipse, BlamWidgetType::Basic_Line, BlamWidgetType::Basic_Triangle,
  BlamWidgetType::Text, BlamWidgetType::Group, BlamWidgetType::Group_VLayout, BlamWidgetType::Group_HLayout,
  BlamWidgetType::Console, BlamWidgetType::UIDCypher, BlamWidgetType::FramerateDisplay, BlamWidgetType::CoordinatesDisplay,
  BlamWidgetType::DebugMenu, BlamWidgetType::DebugMenuItem, BlamWidgetType::CrashScreen, BlamWidgetType::Unspecified
}
 Enumerator listing possible UI widget types. More...
 

Functions

BLAM bool Blam::UI::Initialize ()
 Initializes the UI system. More...
 
BLAM void Blam::UI::Render ()
 Renders all UI to the screen. More...
 
BLAM void Blam::UI::Shutdown ()
 Shuts down the UI system. More...
 
BLAM BlamUIWidget_GroupBlam::UI::GetUIRoot ()
 Retrieves the root UI group widget. More...
 
BLAM std::string Blam::UI::GetWidgetAnchorLabel (BlamWidgetAnchor anchor_position)
 Retrieves a string representation of a widget anchor position. More...
 
BLAM bool Blam::UI::LoadFromCUIScreenTag (std::string tag_path, cui_screen *cusc_tag)
 Creates a new UI widget from a cui_screen tag. More...
 
BLAM BlamUIWidget_CrashScreenBlam::UI::GetCrashScreenWidget ()
 Retrieves the built-in crash screen widget. More...
 
BLAM BlamUIWidget_DebugMenuBlam::UI::GetDebugMenuWidget ()
 Retrieves the built-in debug menu widget. More...
 

Macro Definition Documentation

◆ BLAM

#define BLAM

Enumeration Type Documentation

◆ BlamWidgetAnchor

enum BlamWidgetAnchor : uint8_t
strong

Enumerator listing possible widget anchor positions.

In some special cases, this anchor may not always be respected.

Enumerator
TopCenter 

The widget will be placed at the top-center of the screen.

Center 

The widget will be placed at the center of the screen.

BottomCenter 

The widget will be placed at the bottom-center of the screen.

TopLeft 

The widget will be placed at the top-left of the screen.

CenterLeft 

The widget will be placed at the center-left of the screen.

BottomLeft 

The widget will be placed at the bottom-left of the screen.

TopRight 

The widget will be placed at the top-right of the screen.

CenterRight 

The widget will be placed at the center-right of the screen.

BottomRight 

The widget will be placed at the bottom-right of the screen.

TopFill 

The widget will fill the top of the screen, while height is left unchanged.

LeftFill 

The widget will fill the left of the screen, while width is left unchanged.

RightFill 

The widget will fill the right of the screen, while width is left unchanged.

BottomFill 

The widget will fill the bottom of the screen, while height is left unchanged.

Fill 

The widget will fill the entire screen.

◆ BlamWidgetType

enum BlamWidgetType
strong

Enumerator listing possible UI widget types.

Todo:
All of the widgets listed as "special widgets" should eventually be moved to either an engine extension, or to tags. In either case, they shouldn't be baked into the UI system at this fundamental level - we need a way for custom widgets to work with this.
Enumerator
Basic_Rectangle 

A basic filled or outline rectangle.

Basic_Ellipse 

A basic filled or outline ellipse.

Basic_Line 

A basic line.

Basic_Triangle 

A basic filled or outline triangle.

Text 

A text object, used to show text on-screen.

Group 

A group widget, which can be used to contain any number of other widgets.

Group_VLayout 

A group widget which displays all items in a vertical list.

Group_HLayout 

A group widget which displays all items in a horizontal list.

Console 

Special widget. Used for the in-game console.

UIDCypher 

Special widget. Used for the user ID cypher.

FramerateDisplay 

Special widget. Used for the framerate display.

CoordinatesDisplay 

Special widget. Used for the coordinates display.

DebugMenu 

Special widget. Used for the in-game debug menu.

DebugMenuItem 

Special widget. Represents an item within the debug menu.

CrashScreen 

Special widget. Used for the in-game crash screen.

Unspecified 

Indicates the widget is of an unspecified type. Will only appear when a widget is improperly constructed.