 |
Blamite Game Engine - blam!
00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
4 #include "../../../render_stack.h"
27 D2D1_COLOR_F inactive_color = D2D1::ColorF(204.0f / 255.0f, 204.0f / 255.0f, 191.0f / 255.0f);
28 D2D1_COLOR_F active_color = D2D1::ColorF(0, 0, 0);
29 D2D1_COLOR_F active_color_2 = D2D1::ColorF(91 / 255.0f, 91 / 255.0f, 85 / 255.0f);
31 D2D1_COLOR_F category_text_color = D2D1::ColorF(12 / 255.0f, 165 / 255.0f, 12 / 255.0f);
32 D2D1_COLOR_F prop_text_color = D2D1::ColorF(76 / 255.0f, 107 / 255.0f, 84 / 255.0f);
33 D2D1_COLOR_F exec_text_color = D2D1::ColorF(255 / 255.0f, 127 / 255.0f, 0 / 255.0f);
34 D2D1_COLOR_F unknown_text_color = D2D1::ColorF(1, 0, 0);
38 int global_view_width_base = 60;
39 int global_view_space_between_base = 5;
42 int global_view_width = global_view_width_base;
43 int global_view_space_between = global_view_space_between_base;
81 index->
color = unknown_text_color;
92 label->
color = unknown_text_color;
111 global_value_label->
color = prop_text_color;
116 global_value_label->
shadow_color = D2D1::ColorF(0, 0, 0);
117 global_value_label->
text =
"<global>";
124 animation.
Initialize(active_color, active_color_2, 1.3f,
true);
144 delete global_value_label;
168 label->
color = exec_text_color;
169 index->
color = exec_text_color;
173 label->
color = category_text_color;
174 index->
color = category_text_color;
180 label->
color = prop_text_color;
181 index->
color = prop_text_color;
187 label->
color = unknown_text_color;
188 index->
color = unknown_text_color;
192 label->
color = prop_text_color;
193 index->
color = prop_text_color;
199 label->
color = exec_text_color;
200 index->
color = exec_text_color;
204 label->
color = unknown_text_color;
205 index->
color = unknown_text_color;
218 bar_height = _height;
231 global_view_space_between = global_view_space_between_base * ui_scale_factor;
232 global_view_width = global_view_width_base * ui_scale_factor;
234 background->
SetSize(bar_width, bar_height);
244 global_value_label->
visible =
false;
267 index->
SetTranslation(
x + (8 * ui_scale_factor),
y - (2 * ui_scale_factor));
269 label->
SetTranslation(
x + (26 * ui_scale_factor),
y - (2 * ui_scale_factor));
271 global_bg->
SetSize(global_view_width, bar_height);
272 global_bg->
SetTranslation(
x - (global_view_space_between + global_view_width),
y);
274 global_value_label->
SetTranslation(global_bg->
x + (3 * ui_scale_factor),
y - (2 * ui_scale_factor));
303 global_value_label->
text =
"True";
307 global_value_label->
text =
"False";
312 global_value_label->
text =
"<str>";
321 global_value_label->
Draw();
StackItemDrawMode draw_mode
The drawing mode of the object.
Definition: render_stack.h:373
BLAM void RegisterListener(BlamEventListener *listener)
Registers a an event listener.
Definition: events.cpp:75
D2D1_COLOR_F shadow_color
The color to use for the drop shadow.
Definition: render_stack.h:851
bool visible
Whether or not the object is visible.
Definition: render_stack.h:375
BLAM EngineGlobal * GetGlobal(std::string name)
Retrieves a global with the specified ID.
Definition: globals.cpp:193
BLAM bool GlobalExists(std::string id)
Determines whether or not a global exists.
Definition: globals.cpp:27
std::string font_id
The ID of the font.
Definition: render_stack.h:844
Animation used to handle an alternating fade between two colors.
Definition: ColorTransition.h:22
@ BitmapText
Bitmap-based text, uses Blamite font system.
Definition: render_stack.h:72
StackType type_label
The type of the object.
Definition: render_stack.h:372
BLAM ConfigFile * GetConfig()
Definition: compat.cpp:5
BLAM float * GetGlobalAsFloat(std::string name)
Retrieves a global's value as a float.
Definition: globals.cpp:400
@ Generic
Generic stack type - should probably not be used.
Definition: render_stack.h:57
Namespace containing things relating to the Render Stack.
Definition: drawing.h:14
int shadow_y
The Y offset of the drop shadow.
Definition: render_stack.h:850
Class containing data for a Rectangle object.
Definition: render_stack.h:418
D2D1_COLOR_F GetColor()
Returns the evaluated color data.
Definition: ColorTransition.h:171
void Draw()
Draws the stack object.
Definition: Rectangle.cpp:10
@ String
Represents a std::string.
Definition: globals.h:46
std::string text
The text to display.
Definition: render_stack.h:846
void Initialize(D2D1_COLOR_F _c1, D2D1_COLOR_F _c2, float fade_duration, bool _loop)
Prepares data needed for the animation.
Definition: ColorTransition.h:133
D2D1_COLOR_F color
The color of the object.
Definition: render_stack.h:370
Structure containing data for a game engine global.
Definition: globals.h:62
Class representing an engine tick event.
Definition: TickEvent.h:10
float y
The Y coordinate of the object.
Definition: render_stack.h:378
void Draw()
Draws the stack object.
Definition: BitmapText.cpp:13
bool use_shadow
Whether or not to draw the text with a drop shadow.
Definition: render_stack.h:852
bool GetBoolean(std::string option)
Definition: compat.cpp:38
void SetTranslation(float new_x, float new_y)
Sets the translation of the object.
Definition: StackObjectBase.cpp:55
void Start()
Instructs the listener to start animating.
Definition: ColorTransition.h:157
void Subscribe(BlamEventType type)
Subscribes to an event type.
Definition: BlamEventListener.cpp:3
@ Boolean
Represents a boolean. Can be true or false.
Definition: globals.h:41
@ EventType_Tick
Definition: BlamEvent.h:9
int shadow_x
The X offset of the drop shadow.
Definition: render_stack.h:849
#define DRAWMODE_FILL
Definition: render_stack.h:33
std::string GetString(std::string option)
Definition: compat.cpp:58
std::string value_raw
The raw value of the global as a string.
Definition: globals.h:67
Class representing text drawn using a Bitmap-based engine font.
Definition: render_stack.h:794
Base class for all render stack objects.
Definition: render_stack.h:194
Class representing an Event Listener.
Definition: events.h:27
void SetSize(float new_width, float new_height)
Sets the size of the object.
Definition: StackObjectBase.cpp:110
GvarType type
The type of the global.
Definition: globals.h:64
D2D1_COLOR_F fill_color
The current fill color.
Definition: render_stack.h:453
bool boolean_value
The boolean value of the global.
Definition: globals.h:74
float x
The X coordinate of the object.
Definition: render_stack.h:377