 |
Blamite Game Engine - blam!
00285.12.18.20.1411.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
3 #include "../../debug_ui.h"
15 char search_buffer[128];
16 bool use_tabs =
false;
22 case Blam::Globals::GvarType::Boolean:
29 ImGui::InputShort(global->
name.c_str(), &global->
short_value, 1, 10, NULL);
34 ImGui::InputLong(global->
name.c_str(), &global->
long_value, 1, 10, NULL);
37 case Blam::Globals::GvarType::String:
41 char string_value[1024];
43 string_value[global->
value_raw.size()] = NULL;
45 ImGui::InputText(global->
name.c_str(), string_value, 1024);
51 ImGui::TextColored(ImVec4(1, 0, 0, 1), std::string(
"this global is too long to be modified (must be less than 1024 bytes): '" + global->
name +
"'").c_str());
56 case Blam::Globals::GvarType::Int:
66 case Blam::Globals::GvarType::Color:
68 float color_values[4];
76 ImGui::ColorEdit4(global->
name.c_str(), color_values);
86 ImGui::TextColored(ImVec4(1, 0, 0, 1), std::string(
"this global is not supported for editing: '" + global->
name +
"'").c_str());
91 if (global->
info.size() > 0)
103 if (ImGui::Begin(
"Engine Globals", &
show))
105 ImGui::InputTextWithHint(
"",
"filter globals by name...", search_buffer, 128);
107 ImGui::Checkbox(
"group into tabs", &use_tabs);
110 std::map<std::string, Blam::Globals::EngineGlobal>::iterator it;
114 GenerateGlobalControl(&it->second);
float float_value
The float value of the global.
Definition: globals.h:272
std::string info
An optional description of the global.
Definition: globals.h:260
BlamColor color_value
The color value of the global.
Definition: globals.h:273
@ Long
Represents a long.
Definition: globals.h:238
unsigned char a
The Alpha value of the color.
Definition: globals.h:26
std::string name
The name of the global.
Definition: globals.h:259
short short_value
The short value of the global.
Definition: globals.h:269
std::map< std::string, EngineGlobal > globals
The list of loaded globals.
Definition: globals.cpp:20
@ Float
Definition: render_model.h:17
Structure containing data for a game engine global.
Definition: globals.h:256
bool show
Controls whether or not the group should be shown. May not be used in all groups.
Definition: debug_ui.h:362
long long_value
The long value of the global.
Definition: globals.h:270
Class representing an ImGUI drawing group/draw list item.
Definition: debug_ui.h:359
unsigned char g
The Green value of the color.
Definition: globals.h:24
unsigned char b
The Blue value of the color.
Definition: globals.h:25
@ Short
Represents a short.
Definition: globals.h:237
float GetBlueAsFloat()
Gets the color's red value as a float, between 0 and 1.
Definition: globals.h:87
int int_value
The int value of the global.
Definition: globals.h:271
void Draw()
Draws the contents of the group.
Definition: globals_editor.hpp:99
BLAM std::map< std::string, EngineGlobal > * GetGlobalsList()
Retrieves the list of loaded globals.
Definition: globals.cpp:22
float GetRedAsFloat()
Gets the color's red value as a float, between 0 and 1.
Definition: globals.h:67
float GetGreenAsFloat()
Gets the color's red value as a float, between 0 and 1.
Definition: globals.h:77
std::string value_raw
The raw value of the global as a string.
Definition: globals.h:261
Legacy namespace to contain data for the legacy ImGUI console.
Definition: debug_ui.h:434
float GetAlphaAsFloat()
Gets the color's red value as a float, between 0 and 1.
Definition: globals.h:97
GvarType type
The type of the global.
Definition: globals.h:258
unsigned char r
The Red value of the color.
Definition: globals.h:23
Class for the engine Globals editor.
Definition: globals_editor.hpp:12
bool boolean_value
The boolean value of the global.
Definition: globals.h:268