Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
render_stack_editor.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../../debug_ui.h"
4 
6 
7 using namespace BlamRendering::RenderStack;
8 
10 {
32  {
33  private:
34  int active_index = -1;
35  StackObjectBase* active_object = NULL;
36 
37  bool use_raw_values = false;
38  bool compact_area_input = false;
39  bool rect_limit_to_window = true;
40  float shift_limits[2] = { -5, 5 };
41  float translate_speed = 1;
42 
43  bool show_unreciognized_popup = false;
44  bool show_invalid_popup = false;
45  bool show_outofbounds_popup = false;
46  bool show_delete_imgui_popup = false;
47 
48  StackType add_item_current_selection = StackType::Generic;
49 
50  public:
54  void Draw()
55  {
56  // Functions used to draw the various dialogs if their respective visibiliy booleans are enabled.
57  UnreciognizedTypePopup();
58  InvalidTypePopup();
59  IndexOutOfBoundsPopup();
60  DeleteImGuiObjectPopup();
61 
62  if (show)
63  {
64  if (ImGui::Begin("Render Stack Editor", &show))
65  {
66  if (ImGui::BeginCombo("", GetStackTypeLabel(add_item_current_selection).c_str()))
67  {
68  for (int i = 0; i < GetStackTypesList().size(); i++)
69  {
70  StackType type = GetStackTypesList().at(i);
71 
72  if (ImGui::Selectable(GetStackTypeLabel(type).c_str()))
73  {
74  add_item_current_selection = type;
75  }
76  }
77 
78  ImGui::EndCombo();
79  }
80 
81  ImGui::SameLine();
82 
83  if (ImGui::Button("Add"))
84  {
85  std::string new_object_id = "item_" + GetStack()->size();
86 
87  if (add_item_current_selection == STACKTYPE_IMGUI)
88  {
89  show_invalid_popup = true;
90  }
91  else if (add_item_current_selection == STACKTYPE_GENERIC)
92  {
93  show_invalid_popup = true;
94  }
95  else if (add_item_current_selection == STACKTYPE_RECT)
96  {
98 
99  AddToStack(new_object_id, new_rect);
100  }
101  else if (add_item_current_selection == STACKTYPE_DWTEXT)
102  {
104 
105  AddToStack(new_object_id, new_dwtext);
106  }
107  else if (add_item_current_selection == STACKTYPE_ELLIPSE)
108  {
110 
111  AddToStack(new_object_id, new_ellipse);
112  }
113  else if (add_item_current_selection == STACKTYPE_ROUNDED_RECT)
114  {
116 
117  AddToStack(new_object_id, new_rounded_rect);
118  }
119  else if (add_item_current_selection == STACKTYPE_BITMAP)
120  {
122 
123  AddToStack(new_object_id, new_bitmap);
124  }
125  else if (add_item_current_selection == STACKTYPE_LINE)
126  {
128 
129  AddToStack(new_object_id, new_line);
130  }
131  else if (add_item_current_selection == STACKTYPE_BITMAP_TEXT)
132  {
134 
135  AddToStack(new_object_id, new_bitmap_text);
136  }
137  else if (add_item_current_selection == STACKTYPE_TEXT)
138  {
140 
141  AddToStack(new_object_id, new_text);
142  }
143  else
144  {
145  show_unreciognized_popup = true;
146  }
147  }
148 
149  ImGui::SameLine();
150  if (ImGui::Button("Remove"))
151  {
152  if (GetStack()->at(active_index) != nullptr)
153  {
154  if (GetStack()->at(active_index)->type_label == STACKTYPE_IMGUI)
155  {
156  show_delete_imgui_popup = true;
157  }
158  else
159  {
160  RemoveFromStack(active_index);
161  }
162  }
163  else
164  {
165  show_outofbounds_popup = true;
166  }
167  }
168 
169  ImGui::SameLine();
170  if (ImGui::Button("Duplicate"))
171  {
172  Blam::Logger::LogEventForce("not yet implemented", WSV_NONE);
173  // Duplicate entry here
174  }
175 
176  ImGui::Separator();
177 
178  ImGui::Columns(2);
179 
180  ImGui::SetColumnWidth(0, 200);
181 
182  if (ImGui::Button("^"))
183  {
184  Blam::Logger::LogEventForce("not yet implemented", WSV_NONE);
185  }
186 
187  ImGui::SameLine();
188 
189  if (ImGui::Button("v"))
190  {
191  Blam::Logger::LogEventForce("not yet implemented", WSV_NONE);
192  }
193 
194  if (ImGui::ListBoxHeader("", ImVec2(ImGui::GetColumnWidth() - 15, -1)))
195  {
196  for (int i = 0; i < GetStack()->size(); i++)
197  {
198  StackObjectBase* obj = GetStack()->at(i);
199 
200  std::string label = std::to_string(i) + ": (" + obj->GetType() + ")";
201 
202  const char* label_cstr = label.c_str();
203 
204  bool active = false;
205 
206  if (i == active_index)
207  {
208  active = true;
209  }
210 
211  if (ImGui::Selectable(label_cstr, active))
212  {
213  SelectItem(i, obj);
214  }
215 
216  if (ImGui::IsItemHovered())
217  {
218  ImGui::BeginTooltip();
219  ImGui::PushTextWrapPos(450.0f);
220  ImGui::Text("object details");
221  ImGui::Separator();
222 
223  std::string object_index = "index: " + std::to_string(i);
224  std::string object_type = "type : " + obj->GetType();
225 
226 
227  ImGui::Text(object_index.c_str());
228  ImGui::Text(object_type.c_str());
229 
230  if (obj->type_label == STACKTYPE_DWTEXT)
231  {
232  std::string object_text = "text : " + BlamStrings::Converters::WstringToString(((BlamRendering::RenderStack::DWText*)obj)->text);
233  ImGui::Text(object_text.c_str());
234  }
235 
236  ImGui::PopTextWrapPos();
237  ImGui::EndTooltip();
238  }
239  }
240 
241  ImGui::ListBoxFooter();
242  }
243 
244  ImGui::NextColumn();
245 
246  if (active_object != nullptr)
247  {
248  PropertyView();
249  }
250  else
251  {
252  ImGui::Text("no object selected");
253  }
254  }
255 
256  ImGui::End();
257  }
258  }
259 
266  void SelectItem(int index, StackObjectBase* obj)
267  {
268  active_index = index;
269  active_object = obj;
270  }
271 
276  {
277  std::string header = std::to_string(active_index) + ": (" + active_object->GetType() + ")";
278 
279  ImGui::Text(header.c_str());
280 
281  ImGui::Checkbox("use raw values", &use_raw_values);
282  ImGui::SameLine();
283 
284  float object_width = active_object->area.right - active_object->area.left;
285  float object_height = active_object->area.bottom - active_object->area.top;
286 
287  if (object_width < 0 || object_height < 0)
288  {
289  ImGui::TextColored(ImVec4(255, 0, 0, 255), "[warn]");
290  if (ImGui::IsItemHovered())
291  {
292  ImGui::BeginTooltip();
293  ImGui::PushTextWrapPos(450.0f);
294  ImGui::Text("height and/or width will be negative on conversion!");
295  ImGui::Separator();
296  if (object_width < 0)
297  {
298  std::string width_msg = "object width would be less than 0 (" + std::to_string(object_width) + ")";
299 
300  ImGui::Text(width_msg.c_str());
301  }
302  if (object_height < 0)
303  {
304  std::string height_msg = "object height would be less than 0 (" + std::to_string(object_height) + ")";
305 
306  ImGui::Text(height_msg.c_str());
307  }
308  ImGui::PopTextWrapPos();
309  ImGui::EndTooltip();
310  }
311  }
312  else
313  {
314  ImGui::TextColored(ImVec4(0, 255, 0, 255), "[ok]");
315  }
316  ImGui::SameLine();
317  Blam::DebugUI::Widgets::ShowHelpMarker("when enabled, exposes the raw values seen by directx\r\nwhen disabled, friendlier fields are displayed instead\r\n\r\nthe status indicator shows either [ok] or [warn] based on what the object height will be upon disabling real rect sizes");
318 
319  if (ImGui::BeginTabBar("rse_tabs", ImGuiTabBarFlags_NoTooltip))
320  {
321  if (ImGui::BeginTabItem("Information"))
322  {
323  Widgets::ShowBasicHoveredTooltip("basic information about this object");
324 
325  std::string item_type = "object type: " + active_object->GetType();
326  std::string item_index = "stack index: " + std::to_string(active_index);
327  std::string unique_id = "unique id: " + active_object->unique_id;
328 
329  ImGui::Text(item_type.c_str());
330  ImGui::Text(item_index.c_str());
331  ImGui::Text(unique_id.c_str());
332 
333  ImGui::EndTabItem();
334  }
335 
336  // Properties that are part of all stack objects
337  BasePropertiesTab();
338 
339  std::string unique_props_label = "Properties for " + active_object->GetType();
340 
341  // Properties unique to the given stack object
342  if (ImGui::BeginTabItem(unique_props_label.c_str()))
343  {
344  Widgets::ShowBasicHoveredTooltip("properties specific to this object type");
345 
346  active_object->ShowImPropertyEditor();
347 
348  ImGui::EndTabItem();
349  }
350 
351 
352  ImGui::EndTabBar();
353  }
354  }
355 
360  {
361  if (ImGui::BeginTabItem("Base Properties"))
362  {
363  Widgets::ShowBasicHoveredTooltip("properties applicable to all render stack items\r\nkeep in mind that some objects may not utilize all of these");
364 
365  if (use_raw_values)
366  {
367  ImGui::Checkbox("compact area input", &compact_area_input);
368 
369  if (compact_area_input)
370  {
371  ImGui::DragFloat4("area", (float*)&active_object->area);
372  }
373  else
374  {
375  ImGui::DragFloat("area left", &active_object->area.left);
376  ImGui::DragFloat("area top", &active_object->area.top);
377  ImGui::DragFloat("area right", &active_object->area.right);
378  ImGui::DragFloat("area bottom", &active_object->area.bottom);
379  }
380 
381  std::string value_helper = "top: " + std::to_string(active_object->area.top)
382  + "\r\nbottom: " + std::to_string(active_object->area.bottom)
383  + "\r\nleft: " + std::to_string(active_object->area.left)
384  + "\r\nright: " + std::to_string(active_object->area.right);
385 
386  ImGui::SameLine(); Blam::DebugUI::Widgets::ShowHelpMarker(value_helper.c_str());
387  }
388  else
389  {
390  ImGui::DragFloat("width", &active_object->width, 1, 0, 2147483647, "width: %.3f");
391  ImGui::DragFloat("height", &active_object->height, 1, 0, 2147483647, "height: %.3f");
392 
393  active_object->PokeSize();
394  }
395 
396 
397  ImGui::ColorEdit4("color", (float*)&active_object->color);
398  ImGui::SliderInt("z order", &active_object->z_order, 0, 255);
399 
400  if (use_raw_values)
401  {
402  //use hacky "shift" methods to allow moving object
403  if (ImGui::CollapsingHeader("shifting"))
404  {
405  D2D1_SIZE_F target_size = BlamRendering::DirectX::D2D::GetD2DRenderTarget()->GetSize();
406 
407  ImGui::Checkbox("limit to window", &rect_limit_to_window);
408 
409 
410  float rect_shift[2] = { 0, 0 };
411  ImGui::SliderFloat2("shift", rect_shift, shift_limits[0], shift_limits[1]);
412 
413  ImGui::InputFloat2("shift bounds", shift_limits);
414 
415  ImGui::SameLine(); Blam::DebugUI::Widgets::ShowHelpMarker("this controls the min and max bounds of the above sliders \r\nlarger numbers means faster movement");
416 
417 
418 
420  {
421  if ((active_object->area.top > 0 || rect_shift[0] > 0) && (active_object->area.bottom < target_size.height || rect_shift[0] < 0))
422  {
423  active_object->area.top = active_object->area.top + rect_shift[0];
424  active_object->area.bottom = active_object->area.bottom + rect_shift[0];
425  }
426 
427  if ((active_object->area.left > 0 || rect_shift[1] > 0) && (active_object->area.right < target_size.width || rect_shift[1] < 0))
428  {
429  active_object->area.left = active_object->area.left + rect_shift[1];
430  active_object->area.right = active_object->area.right + rect_shift[1];
431  }
432  }
433  else
434  {
435  active_object->area.top = active_object->area.top + rect_shift[0];
436  active_object->area.bottom = active_object->area.bottom + rect_shift[0];
437  active_object->area.left = active_object->area.left + rect_shift[1];
438  active_object->area.right = active_object->area.right + rect_shift[1];
439  }
440  }
441  }
442  else
443  {
444  // Modify object translation
445  if (ImGui::CollapsingHeader("translation"))
446  {
447  D2D1_SIZE_F target_size = BlamRendering::DirectX::D2D::GetD2DRenderTarget()->GetSize();
448 
449  ImGui::Checkbox("limit to window", &rect_limit_to_window);
450 
451 
452 
453  float x = active_object->area.left;
454  float y = active_object->area.top;
455 
456  float x_min = -2147483647;
457  float x_max = 2147483647;
458 
459  float y_min = -2147483647;
460  float y_max = 2147483647;
461 
463  {
464  x_min = 0;
465  x_max = target_size.width - active_object->width;
466 
467  y_min = 0;
468  y_max = target_size.height - active_object->height;
469  }
470 
471 
472 
473  ImGui::InputFloat("drag speed", &translate_speed);
474 
475  ImGui::DragFloat("x coord", &active_object->x, translate_speed, x_min, x_max, "x: %.3f");
476  ImGui::DragFloat("y coord", &active_object->y, translate_speed, y_min, y_max, "y: %.3f");
477 
478  active_object->PokeTranslation();
479 
480  if (active_object->type_label == STACKTYPE_ELLIPSE)
481  {
483 
484  ellipse_object->PokeEllipseTranslation();
485  }
486 
487  if (active_object->type_label == STACKTYPE_ROUNDED_RECT)
488  {
490 
491  rounded_rect_object->PokeRoundedRectArea();
492  }
493 
494  if (active_object->type_label == STACKTYPE_LINE)
495  {
497 
498  line_object->PokeLineTranslation();
499  }
500 
501  if (active_object->type_label == STACKTYPE_TEXT)
502  {
504 
505  text_object->UpdateAllProperties();
506  text_object->RefreshTranslation();
507  }
508  }
509  }
510 
511  if (active_object->type_label == STACKTYPE_DEBUG_MENU)
512  {
514 
515  debug_menu_object->PokePropertyChanges();
516  }
517 
518  ImGui::EndTabItem();
519  }
520  }
521 
522  #pragma region dialogs
523 
528  {
529  if (show_delete_imgui_popup)
530  {
531  ImGui::OpenPopup("WARNING");
532  if (ImGui::BeginPopupModal("WARNING", &show_delete_imgui_popup, ImGuiWindowFlags_NoResize))
533  {
534  ImGui::Text("you are trying to delete imgui stack object! this will remove imgui entirely, including stack editor!");
535  ImGui::NewLine();
536  ImGui::Text("do you wish to continue?");
537  ImGui::Text("tip: you can re-add by enabling the win32 menu bar and choosing Test > Restore ImGUI");
538 
539  if (ImGui::Button("yes"))
540  {
541  RemoveFromStack(active_index);
542  show_delete_imgui_popup = false;
543  }
544 
545  if (ImGui::Button("no"))
546  {
547  show_delete_imgui_popup = false;
548  }
549 
550  ImGui::EndPopup();
551  }
552  }
553  }
554 
562  {
563  if (show_outofbounds_popup)
564  {
565  ImGui::OpenPopup("index out of bounds");
566  if (ImGui::BeginPopupModal("index out of bounds", &show_outofbounds_popup, ImGuiWindowFlags_NoResize))
567  {
568  ImGui::Text("selected render stack item index was out of bounds (most likely no object was selected)");
569  ImGui::NewLine();
570 
571  std::string selected_index_text = "selected item index: " + active_index;
572 
573  ImGui::Text(selected_index_text.c_str());
574 
575  if (ImGui::Button("ok"))
576  {
577  show_outofbounds_popup = false;
578  }
579 
580  ImGui::EndPopup();
581  }
582  }
583  }
584 
592  {
593  if (show_unreciognized_popup)
594  {
595  ImGui::OpenPopup("unreciognized or invalid type");
596  if (ImGui::BeginPopupModal("unreciognized or invalid type", &show_unreciognized_popup, ImGuiWindowFlags_NoResize))
597  {
598  ImGui::Text("invalid type specified, unreciognized type,\r\nor no object add functionality implemented");
599  ImGui::NewLine();
600  ImGui::Text("hint: look for 'render_stack_editor.cpp' and\r\ncheck there");
601 
602  if (ImGui::Button("ok"))
603  {
604  show_unreciognized_popup = false;
605  }
606 
607  ImGui::EndPopup();
608  }
609  }
610  }
611 
619  {
620  if (show_invalid_popup)
621  {
622  ImGui::OpenPopup("invalid type");
623  if (ImGui::BeginPopupModal("invalid type", &show_invalid_popup, ImGuiWindowFlags_NoResize))
624  {
625  ImGui::Text("tried to add invalid object type!");
626  ImGui::Separator();
627  ImGui::Text("possible causes:");
628  ImGui::BulletText("imgui items can only be added once - as that object controls\r\nthe entirety of imgui - you can't have two of them");
629  ImGui::BulletText("generic stack objects have no drawing functionality and thus\r\nwould do nothing but waste memory");
630  ImGui::Separator();
631  ImGui::Text("if you tried to add another object type, then the functionality\r\nwas either deliberately disabled or something got borked - check\r\n'render_stack_editor.hpp' for clues");
632 
633  ImGui::NewLine();
634  if (ImGui::Button("sure thing bro"))
635  {
636  show_invalid_popup = false;
637  }
638 
639  ImGui::EndPopup();
640  }
641  }
642  }
643 
644  #pragma endregion
645  };
646 }
BlamRendering::RenderStack::DWText
Class containing data for a text object using DirectWrite.
Definition: render_stack.h:656
rect_limit_to_window
bool rect_limit_to_window
Definition: Line.cpp:10
BlamRendering::RenderStack::GetStackTypesList
BLAM std::vector< StackType > GetStackTypesList()
Retrieves a list of all available stack types.
Definition: render_stack.cpp:191
Blam::DebugUI::Widgets::ShowHelpMarker
BLAM void ShowHelpMarker(const char *desc)
Shows a help indicator.
Definition: widgets.cpp:7
BlamRendering::RenderStack::GetStack
BLAM std::vector< StackObjectBase * > * GetStack()
Retrieves the render stack contents.
Definition: render_stack.cpp:65
BlamRendering::RenderStack::Text::UpdateAllProperties
void UpdateAllProperties()
Applies any modified parent properties to the appropriate child object.
Definition: Text.cpp:74
Blam::DebugUI::Windows::RenderStackEditor::PropertyView
void PropertyView()
Shows the property view controls, base controls, and any controls specific to the active render stack...
Definition: render_stack_editor.hpp:275
STACKTYPE_ROUNDED_RECT
#define STACKTYPE_ROUNDED_RECT
Definition: render_stack.h:16
STACKTYPE_DEBUG_MENU
#define STACKTYPE_DEBUG_MENU
Definition: render_stack.h:28
STACKTYPE_DWTEXT
#define STACKTYPE_DWTEXT
Definition: render_stack.h:17
BlamRendering::RenderStack::StackObjectBase::GetType
std::string GetType()
Retrieves the type of item that this stack object is.
Definition: StackObjectBase.cpp:125
BitmapText
@ BitmapText
Bitmap-based text, uses Blamite font system.
Definition: render_stack.h:72
BlamRendering::RenderStack::Text::RefreshTranslation
void RefreshTranslation()
Refreshes any translation data and applies them to the child objects.
Definition: Text.cpp:55
BlamRendering::DirectX::D2D::GetD2DRenderTarget
BLAM ID2D1DeviceContext * GetD2DRenderTarget()
Retrieves the Direct2D render target.
Definition: render_manage.cpp:598
BlamRendering::RenderStack::StackObjectBase::type_label
StackType type_label
The type of the object.
Definition: render_stack.h:372
Blam::DebugUI::Windows::RenderStackEditor::DeleteImGuiObjectPopup
void DeleteImGuiObjectPopup()
Shows a confirmation dialog when trying to delete the ImGUI stack object.
Definition: render_stack_editor.hpp:527
STACKTYPE_RECT
#define STACKTYPE_RECT
Definition: render_stack.h:15
Generic
@ Generic
Generic stack type - should probably not be used.
Definition: render_stack.h:57
BlamRendering::RenderStack
Namespace containing things relating to the Render Stack.
Definition: drawing.h:14
BlamRendering::RenderStack::DebugMenu
Stack item representing the debug menu.
Definition: debug_menu.hpp:20
Blam::DebugUI::Windows::RenderStackEditor::IndexOutOfBoundsPopup
void IndexOutOfBoundsPopup()
Shows a warning dialog indicating that the selected render stack index was out of bounds.
Definition: render_stack_editor.hpp:561
BlamRendering::RenderStack::Rectangle
Class containing data for a Rectangle object.
Definition: render_stack.h:418
BlamRendering::RenderStack::StackObjectBase::z_order
int z_order
The Z-Order of the object.
Definition: render_stack.h:371
Blam::Logger::LogEventForce
BLAM void LogEventForce(std::string message, BlamLogLevel severity)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:218
debug_menu.hpp
BlamRendering::RenderStack::StackObjectBase::color
D2D1_COLOR_F color
The color of the object.
Definition: render_stack.h:370
BlamRendering::RenderStack::RoundedRectangle
Class containing data for a Rounded Rectangle object.
Definition: render_stack.h:463
BlamRendering::RenderStack::StackObjectBase::y
float y
The Y coordinate of the object.
Definition: render_stack.h:378
BlamRendering::RenderStack::Bitmap
Class containing data for a Bitmap object.
Definition: render_stack.h:573
BlamRendering::RenderStack::Ellipse
Class containing data for an Ellipse object.
Definition: render_stack.h:521
Blam::DebugUI::Windows::RenderStackEditor::BasePropertiesTab
void BasePropertiesTab()
Shows properties that are part of BlamRendering::RenderStack::StackObjectBase.
Definition: render_stack_editor.hpp:359
Line
@ Line
Direct2D Line.
Definition: render_stack.h:65
BlamRendering::RenderStack::StackObjectBase::PokeSize
void PokeSize()
Updates the area of the object to account for any width/height changes.
Definition: StackObjectBase.cpp:119
Blam::DebugUI::Windows::RenderStackEditor::Draw
void Draw()
Draws the render stack editor dialog, as well as any active popups if need be.
Definition: render_stack_editor.hpp:54
STACKTYPE_ELLIPSE
#define STACKTYPE_ELLIPSE
Definition: render_stack.h:18
WSV_NONE
#define WSV_NONE
Macro for 'None' log seveirty. Original pre-enum value was 0.
Definition: logger.h:16
STACKTYPE_LINE
#define STACKTYPE_LINE
Definition: render_stack.h:19
Blam::DebugUI::ImGUIDrawingGroup
Class representing an ImGUI drawing group/draw list item.
Definition: debug_ui.h:359
Blam::DebugUI::Windows::RenderStackEditor::InvalidTypePopup
void InvalidTypePopup()
Shows a warning dialog indicating that the selected render stack type is invalid.
Definition: render_stack_editor.hpp:618
STACKTYPE_TEXT
#define STACKTYPE_TEXT
Definition: render_stack.h:29
Blam::DebugUI::Windows::RenderStackEditor::SelectItem
void SelectItem(int index, StackObjectBase *obj)
Changes the selected item and stack object.
Definition: render_stack_editor.hpp:266
STACKTYPE_BITMAP
#define STACKTYPE_BITMAP
Definition: render_stack.h:20
BlamRendering::RenderStack::StackObjectBase::unique_id
std::string unique_id
The unique ID of this object.
Definition: render_stack.h:382
Blam::DebugUI::Windows::RenderStackEditor::UnreciognizedTypePopup
void UnreciognizedTypePopup()
Shows a warning dialog indicating that the user tried to add a new unknown stack type to the render s...
Definition: render_stack_editor.hpp:591
BlamRendering::RenderStack::StackObjectBase::PokeTranslation
void PokeTranslation()
Updates the area of the object to account for any x/y coordinate changes.
Definition: StackObjectBase.cpp:97
STACKTYPE_BITMAP_TEXT
#define STACKTYPE_BITMAP_TEXT
Definition: render_stack.h:24
BlamRendering::RenderStack::StackObjectBase::area
D2D1_RECT_F area
The area of the object.
Definition: render_stack.h:369
BlamRendering::RenderStack::AddToStack
BLAM int AddToStack(std::string id, StackObjectBase *object)
Adds an item to the render stack.
Definition: render_stack.cpp:12
BlamRendering::RenderStack::StackObjectBase::width
float width
The width of the object.
Definition: render_stack.h:379
BlamRendering::RenderStack::StackObjectBase::ShowImPropertyEditor
virtual void ShowImPropertyEditor()
Shows a set of ImGUI properties associated with the object.
Definition: render_stack.h:239
BlamRendering::RenderStack::Text
Class used to wrap around BitmapText and DWText, making the usage of both of them directly unnecessar...
Definition: render_stack.h:896
BlamRendering::RenderStack::RemoveFromStack
BLAM void RemoveFromStack(std::string id)
Removes an item from the render stack.
Definition: render_stack.cpp:26
BlamRendering::RenderStack::GetStackTypeLabel
BLAM std::string GetStackTypeLabel(StackType type)
Retrieves a string representation of the specified stack type.
Definition: render_stack.cpp:133
Bitmap
@ Bitmap
Direct2D Bitmap.
Definition: render_stack.h:66
BlamRendering::RenderStack::StackObjectBase::height
float height
The height of the object.
Definition: render_stack.h:380
STACKTYPE_GENERIC
#define STACKTYPE_GENERIC
Definition: render_stack.h:13
BlamRendering::RenderStack::Ellipse::PokeEllipseTranslation
void PokeEllipseTranslation()
Updates the ellipse origin point based on the x/y coordinates.
Definition: ellipse.cpp:23
BlamRendering::RenderStack::BitmapText
Class representing text drawn using a Bitmap-based engine font.
Definition: render_stack.h:794
BlamRendering::RenderStack::StackObjectBase
Base class for all render stack objects.
Definition: render_stack.h:194
Blam::DebugUI::Windows
Legacy namespace to contain data for the legacy ImGUI console.
Definition: debug_ui.h:434
BlamRendering::RenderStack::RoundedRectangle::PokeRoundedRectArea
void PokeRoundedRectArea()
Updates the area of the rounded rectangle after area modification.
Definition: RoundedRectangle.cpp:23
Text
@ Text
Master text object that wraps around both BitmapText and DWText.
Definition: render_stack.h:73
StackType
StackType
Enumerator to determine the type of render stack item.
Definition: render_stack.h:54
DWText
@ DWText
DirectWrite Text, does not utilize our font system - probably dont use this.
Definition: render_stack.h:63
STACKTYPE_IMGUI
#define STACKTYPE_IMGUI
Definition: render_stack.h:14
Blam::DebugUI::Windows::RenderStackEditor
Class for the Render Stack Editor.
Definition: render_stack_editor.hpp:31
translate_speed
float translate_speed
Definition: Line.cpp:11
Blam::DebugUI::Widgets::ShowBasicHoveredTooltip
BLAM void ShowBasicHoveredTooltip(const char *text)
Shows a tooltip with the specified text upon hovering over the control it is applied to.
Definition: widgets.cpp:32
BlamRendering::RenderStack::StackObjectBase::x
float x
The X coordinate of the object.
Definition: render_stack.h:377
BlamRendering::RenderStack::DebugMenu::PokePropertyChanges
void PokePropertyChanges()
Adjust any properties to ensure that everything is displayed properly and respects the UI scale facto...
Definition: debug_menu.hpp:368
BlamRendering::RenderStack::Line::PokeLineTranslation
void PokeLineTranslation()
Pokes the line start/end points to match the coordinates/area.
Definition: Line.cpp:37
BlamRendering::RenderStack::Line
Class containing data for a Line object.
Definition: render_stack.h:599