 |
Blamite Game Engine - blam!
00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
4 #include <Strings/components/resources/color/BlamColor.h>
5 #include <OGRE/Overlay/OgreTextAreaOverlayElement.h>
6 #include <OGRE/Overlay/OgreOverlayContainer.h>
7 #include <OGRE/Overlay/OgrePanelOverlayElement.h>
8 #include <OGRE/Overlay/OgreOverlay.h>
9 #include <OGRE/OgreManualObject2.h>
10 #include <OGRE/OgreSceneManager.h>
88 void ShowAnchorChangeButton(
BlamWidgetAnchor new_anchor,
int height_mul,
int width_mul,
bool text_multiline);
103 BlamVector2
size = { 100, 100 };
128 void SetSize(BlamVector2 new_size);
129 virtual void SetPosition(BlamVector2 new_position);
148 std::vector<BlamUIWidget*>
children = std::vector<BlamUIWidget*>();
155 void Draw()
override;
159 void SetHidden(
bool new_hidden)
override;
169 int cached_child_count = 0;
179 void Draw()
override;
187 bool last_hide_state =
false;
188 Ogre::ManualObject* manual_object =
nullptr;
189 Ogre::SceneNode* node =
nullptr;
190 Ogre::HlmsUnlitDatablock* datablock =
nullptr;
191 bool needs_regen =
true;
193 void GenerateManualObject();
196 BlamColor
color = BlamColor(255, 255, 255);
203 void Draw()
override;
206 void SetHidden(
bool new_hidden)
override;
212 bool last_hide_state =
false;
213 Ogre::ManualObject* manual_object =
nullptr;
214 Ogre::SceneNode* node =
nullptr;
215 Ogre::HlmsUnlitDatablock* datablock =
nullptr;
216 bool needs_regen =
true;
218 void GenerateManualObject();
221 BlamColor
color = BlamColor(255, 255, 255);
230 void Draw()
override;
233 void SetHidden(
bool new_hidden)
override;
239 bool last_hide_state =
false;
240 Ogre::ManualObject* manual_object =
nullptr;
241 Ogre::SceneNode* node =
nullptr;
242 Ogre::HlmsUnlitDatablock* datablock =
nullptr;
243 bool needs_regen =
true;
245 void GenerateManualObject();
248 BlamColor
color = BlamColor(255, 255, 255);
252 BlamVector2
end = { 0, 0 };
257 void Draw()
override;
260 void SetHidden(
bool new_hidden)
override;
266 bool last_hide_state =
false;
267 Ogre::ManualObject* manual_object =
nullptr;
268 Ogre::SceneNode* node =
nullptr;
269 Ogre::HlmsUnlitDatablock* datablock =
nullptr;
270 bool needs_regen =
true;
272 void GenerateManualObject();
275 BlamColor
color = BlamColor(255, 255, 255);
287 void Draw()
override;
290 void SetHidden(
bool new_hidden)
override;
296 Ogre::v1::TextAreaOverlayElement* text_element =
nullptr;
297 Ogre::v1::TextAreaOverlayElement* text_element_shadow =
nullptr;
298 Ogre::v1::Overlay* container =
nullptr;
299 Ogre::v1::PanelOverlayElement* panel =
nullptr;
301 Ogre::SceneNode* node =
nullptr;
302 Ogre::ManualObject* manual_object =
nullptr;
304 std::string previous_text =
"";
305 bool last_hide_state =
false;
306 BlamColor last_color = BlamColor(255, 255, 255);
307 BlamColor last_shadow_color = BlamColor(0, 0, 0);
309 bool new_render_method =
false;
311 std::vector<Ogre::HlmsDatablock*> datablocks = std::vector<Ogre::HlmsDatablock*>();
312 std::vector<Ogre::HlmsDatablock*> shadow_datablocks = std::vector<Ogre::HlmsDatablock*>();
313 bool needs_new_datablocks =
true;
315 void ReleaseOldDatablocks();
316 void GenerateManualObject();
317 void GenerateManualObjectSection(
bool is_shadow);
323 BlamColor
color = BlamColor(255, 255, 255);
332 void Draw()
override;
335 void SetHidden(
bool new_hidden)
override;
@ DebugMenu
Special widget. Used for the in-game debug menu.
@ BottomFill
The widget will fill the bottom of the screen, while height is left unchanged.
BlamUIWidget_Text(BlamUIWidget_Group *_parent, bool _new_render_method=true)
Definition: text.cpp:30
@ CenterRight
The widget will be placed at the center-right of the screen.
@ Center
The widget will be placed at the center of the screen.
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:142
std::string font_name
Definition: ui.h:325
void RebuildDatablocks()
Definition: text.cpp:580
BlamWidgetAnchor
Enumerator listing possible widget anchor positions.
Definition: ui.h:36
BLAM Ogre::HlmsDatablock * GetDatablockFromTag(std::string tag_path)
Definition: materials.cpp:834
BLAM std::string GetWidgetAnchorLabel(BlamWidgetAnchor anchor_position)
Definition: ui.cpp:79
IMGUI_API bool Checkbox(const char *label, bool *v)
Definition: imgui_widgets.cpp:974
BLAM BlamUIWidget_Group * GetUIRoot()
Definition: ui.cpp:74
BLAM BlamRenderingEngine GetCurrentRenderingEngine()
Retrieves the current rendering engine being used.
Definition: rendering_abstraction.cpp:104
BlamFontPackage * font_package
Definition: ui.h:326
int character_height
Definition: ui.h:321
BlamVector2 shadow_offset
Definition: ui.h:322
@ Text
A text object, used to show text on-screen.
@ Basic_Rectangle
A basic filled or outline rectangle.
@ OGRE
Definition: rendering.h:41
@ Basic_Ellipse
A basic filled or outline ellipse.
IMGUI_API bool InputText(const char *label, char *buf, size_t buf_size, ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=NULL, void *user_data=NULL)
Definition: imgui_widgets.cpp:3068
@ Console
Indicates the build string should be formatted for the in-game console.
@ BottomLeft
The widget will be placed at the bottom-left of the screen.
@ Group_VLayout
A group widget which displays all items in a vertical list.
BLAM float * GetGlobalAsFloat(std::string name)
Retrieves a global's value as a float.
Definition: globals.cpp:407
Definition: cui_screen.h:43
unsigned char uint8_t
Definition: stdint.h:15
void SetHidden(bool new_hidden) override
Definition: text.cpp:588
@ BottomRight
The widget will be placed at the bottom-right of the screen.
BLAM ogre_material_instance_data * GetDatablockInstanceFromTag(std::string tag_path, std::string referencing_tag_path)
Definition: materials.cpp:846
BLAM BlamUIWidget_CrashScreen * GetCrashScreenWidget()
Definition: ui.cpp:287
@ CenterLeft
The widget will be placed at the center-left of the screen.
IMGUI_API bool DragInt(const char *label, int *v, float v_speed=1.0f, int v_min=0, int v_max=0, const char *format="%d")
Definition: imgui_widgets.cpp:2209
void ShowImGuiPropertyEditor() override
Definition: text.cpp:168
IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f)
Definition: imgui.cpp:7147
@ TopCenter
The widget will be placed at the top-center of the screen.
@ BottomCenter
The widget will be placed at the bottom-center of the screen.
BLAM bool LoadFromCUIScreenTag(std::string tag_path, cui_screen *cusc_tag)
Definition: ui.cpp:144
BLAM int GetRenderHeight()
Definition: bgfx.cpp:190
@ RightFill
The widget will fill the right of the screen, while width is left unchanged.
@ UIDCypher
Special widget. Used for the user ID cypher.
Namespace containing functions relating to the Blamite UI system.
Definition: ui.h:344
~BlamUIWidget_Text()
Definition: text.cpp:76
IMGUI_API bool DragFloat(const char *label, float *v, float v_speed=1.0f, float v_min=0.0f, float v_max=0.0f, const char *format="%.3f", float power=1.0f)
Definition: imgui_widgets.cpp:2164
void UpdateMetrics() override
Definition: text.cpp:194
IMGUI_API bool DragFloat2(const char *label, float v[2], float v_speed=1.0f, float v_min=0.0f, float v_max=0.0f, const char *format="%.3f", float power=1.0f)
Definition: imgui_widgets.cpp:2169
void Draw() override
Definition: text.cpp:115
@ TopLeft
The widget will be placed at the top-left of the screen.
BlamColor color
Definition: ui.h:323
BLAM void Render()
Definition: ui.cpp:51
@ DebugMenuItem
Special widget. Represents an item within the debug menu.
BLAM void Shutdown()
Definition: ui.cpp:65
@ TopFill
The widget will fill the top of the screen, while height is left unchanged.
IMGUI_API bool BeginCombo(const char *label, const char *preview_value, ImGuiComboFlags flags=0)
Definition: imgui_widgets.cpp:1416
BLAM int GetRenderHeight()
Definition: ogre.cpp:375
Definition: material.h:53
@ CrashScreen
Special widget. Used for the in-game crash screen.
@ Basic_Triangle
A basic filled or outline triangle.
Ogre::HlmsDatablock * instance_datablock
Definition: rendering.h:49
Definition: rendering.h:45
Class for the Blam UI Editor debug utility.
Definition: blam_ui_editor.hpp:13
@ Group_HLayout
A group widget which displays all items in a horizontal list.
#define BLAM
Definition: ui.h:19
IMGUI_API bool InputTextMultiline(const char *label, char *buf, size_t buf_size, const ImVec2 &size=ImVec2(0, 0), ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=NULL, void *user_data=NULL)
Definition: imgui_widgets.cpp:3074
IMGUI_API void EndCombo()
Definition: imgui_widgets.cpp:1522
BlamUIWidget_Group * ui_root
The UI root widget.
Definition: ui.cpp:12
@ CoordinatesDisplay
Special widget. Used for the coordinates display.
@ Fill
The widget will fill the entire screen.
std::string text
Definition: ui.h:327
BLAM int GetRenderWidth()
Definition: bgfx.cpp:185
@ Group
A group widget, which can be used to contain any number of other widgets.
bool draw_fail_message_shown
Whether or not the "draw failure" message has been displayed. Used to prevent spamming the log if the...
Definition: ui.cpp:13
BlamColor shadow_color
Definition: ui.h:324
BLAM int GetRenderWidth()
Definition: ogre.cpp:370
@ FramerateDisplay
Special widget. Used for the framerate display.
@ Basic_Line
A basic line.
IMGUI_API void Separator()
Definition: imgui_widgets.cpp:1284
BlamWidgetType
Enumerator listing possible UI widget types.
Definition: ui.h:60
BLAM bool Initialize()
Definition: ui.cpp:15
Legacy namespace to contain data for the legacy ImGUI console.
Definition: ui.h:26
void RebuildTextObject()
Definition: text.cpp:310
bool auto_scale_shadow
Definition: ui.h:320
@ BGFX
Definition: rendering.h:40
@ LeftFill
The widget will fill the left of the screen, while width is left unchanged.
@ Unspecified
Indicates the widget is of an unspecified type. Will only appear when a widget is improperly construc...
IMGUI_API bool Button(const char *label, const ImVec2 &size=ImVec2(0, 0))
Definition: imgui_widgets.cpp:644
@ TopRight
The widget will be placed at the top-right of the screen.
BLAM int * GetGlobalAsInteger(std::string name)
Retrieves a global's value as an int.
Definition: globals.cpp:395