 |
Blamite Game Engine - blam!
00346.12.11.21.0529.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
3 #include "../../debug_ui.h"
8 #include <Strings/components/utils/converters/converters.h>
25 bool draw_rect =
true;
26 bool rect_limit_to_window =
true;
27 float shift_limits[2] = { -5, 5 };
28 float rect[4] = { 50, 500, 50, 250 };
29 float rect_color[3] = { 255, 255, 255 };
30 float r_thickness = 5;
33 bool draw_text =
true;
34 std::wstring f_text = L
"Test message";
35 std::wstring font_name = L
"Ubuntu";
36 char text[512] =
"Test message";
37 char font[512] =
"Ubuntu";
38 float font_rect[4] = { 575, 700, 150, 600 };
39 float font_color[3] = { 255, 255, 255 };
43 bool draw_text_zone =
true;
44 float zone_thickness = 2;
46 float zone_color[3] = { 255, 0, 0 };
82 float rect_shift[2] = { 0, 0 };
91 if ((rect[0] > 0 || rect_shift[0] > 0) && (rect[1] < target_size.height || rect_shift[0] < 0))
93 rect[0] = rect[0] + rect_shift[0];
94 rect[1] = rect[1] + rect_shift[0];
97 if ((rect[2] > 0 || rect_shift[1] > 0) && (rect[3] < target_size.width || rect_shift[1] < 0))
99 rect[2] = rect[2] + rect_shift[1];
100 rect[3] = rect[3] + rect_shift[1];
105 rect[0] = rect[0] + rect_shift[0];
106 rect[1] = rect[1] + rect_shift[0];
107 rect[2] = rect[2] + rect_shift[1];
108 rect[3] = rect[3] + rect_shift[1];
122 f_text = BlamStrings::Converters::ConvertStringToWstring(text);
125 font_name = BlamStrings::Converters::ConvertStringToWstring(
font);
137 D2D1_RECT_F rect_f = D2D1::RectF(rect[2], rect[0], rect[3], rect[1]);
160 D2D1_RECT_F text_border = D2D1::RectF(font_rect[2], font_rect[0], font_rect[3], font_rect[1]);
IMGUI_API bool ColorEdit3(const char *label, float col[3], ImGuiColorEditFlags flags=0)
Definition: imgui_widgets.cpp:4146
bool rect_limit_to_window
Definition: Line.cpp:10
IMGUI_API bool SliderFloat2(const char *label, float v[2], float v_min, float v_max, const char *format="%.3f", float power=1.0f)
Definition: imgui_widgets.cpp:2624
IMGUI_API bool Checkbox(const char *label, bool *v)
Definition: imgui_widgets.cpp:974
IMGUI_API void PopStyleColor(int count=1)
Definition: imgui.cpp:6341
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
BLAM ID2D1DeviceContext * GetD2DRenderTarget()
Retrieves the Direct2D render target.
Definition: render_manage.cpp:598
IMGUI_API void End()
Definition: imgui.cpp:6016
@ ImGuiColorEditFlags_RGB
Definition: imgui.h:1165
IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f)
Definition: imgui.cpp:7147
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
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
Definition: imgui.cpp:5397
IMGUI_API void Text(const char *fmt,...) IM_FMTARGS(1)
Definition: imgui_widgets.cpp:238
Direct2DTest()
Empty constructor.
Definition: d2d_test.hpp:52
bool show
Controls whether or not the group should be shown. May not be used in all groups.
Definition: debug_ui.h:362
BLAM HRESULT DrawRect(D2D1_COLOR_F outline_color, D2D1_COLOR_F fill_color, D2D1_RECT_F rect, float thickness, StackItemDrawMode mode)
Draws a rectangle.
Definition: rect.cpp:9
Class representing an ImGUI drawing group/draw list item.
Definition: debug_ui.h:359
Dialog used to test early implementation of Direct2D.
Definition: d2d_test.hpp:18
IMGUI_API bool InputFloat2(const char *label, float v[2], const char *format="%.3f", ImGuiInputTextFlags flags=0)
Definition: imgui_widgets.cpp:2981
@ ImGuiCol_Text
Definition: imgui.h:1027
void Draw()
Draws the window and any Direct2D primitives that have been enabled.
Definition: d2d_test.hpp:62
IMGUI_API void Separator()
Definition: imgui_widgets.cpp:1284
~Direct2DTest()
Empty destructor.
Definition: d2d_test.hpp:57
IMGUI_API bool DragFloat4(const char *label, float v[4], 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:2179
Legacy namespace to contain data for the legacy ImGUI console.
Definition: ui.h:14
io.Fonts->AddFontFromMemoryCompressedTTF(compressed_data, compressed_data_size, size_pixels,...) font
Definition: README.txt:86
BLAM HRESULT DWDrawText(std::wstring text, std::wstring font, float size, D2D1_RECT_F area, D2D1_COLOR_F color)
Draws a string using DirectWrite.
Definition: dwtext.cpp:16
IMGUI_API void PushStyleColor(ImGuiCol idx, ImU32 col)
Definition: imgui.cpp:6321