Elaztek Developer Hub
Blamite Game Engine - blam!  00346.12.11.21.0529.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 
79  }
80 
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 
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 
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  {
219  ImGui::PushTextWrapPos(450.0f);
220  ImGui::Text("object details");
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 
238  }
239  }
240 
242  }
243 
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  {
293  ImGui::PushTextWrapPos(450.0f);
294  ImGui::Text("height and/or width will be negative on conversion!");
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  }
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 
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 
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 
349  }
350 
351 
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 
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 
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!");
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");
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
ImGui::SliderFloat2
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
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
ImGui::BeginTooltip
IMGUI_API void BeginTooltip()
Definition: imgui.cpp:7362
ImGui::EndPopup
IMGUI_API void EndPopup()
Definition: imgui.cpp:7675
BlamRendering::RenderStack::Text::UpdateAllProperties
void UpdateAllProperties()
Applies any modified parent properties to the appropriate child object.
Definition: Text.cpp:74
ImGui::Checkbox
IMGUI_API bool Checkbox(const char *label, bool *v)
Definition: imgui_widgets.cpp:974
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
ImGui::BeginPopupModal
IMGUI_API bool BeginPopupModal(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
Definition: imgui.cpp:7647
STACKTYPE_DWTEXT
#define STACKTYPE_DWTEXT
Definition: render_stack.h:17
ImGui::ListBoxFooter
IMGUI_API void ListBoxFooter()
Definition: imgui_widgets.cpp:5668
BlamRendering::RenderStack::StackObjectBase::GetType
std::string GetType()
Retrieves the type of item that this stack object is.
Definition: StackObjectBase.cpp:125
ImVec4
Definition: imgui.h:192
BitmapText
@ BitmapText
Bitmap-based text, uses Blamite font system.
Definition: render_stack.h:72
ImGui::NextColumn
IMGUI_API void NextColumn()
Definition: imgui_widgets.cpp:7445
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
ImGui::End
IMGUI_API void End()
Definition: imgui.cpp:6016
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
ImGui::SetColumnWidth
IMGUI_API void SetColumnWidth(int column_index, float width)
Definition: imgui_widgets.cpp:7297
ImGui::EndTabItem
IMGUI_API void EndTabItem()
Definition: imgui_widgets.cpp:6851
BlamRendering::RenderStack::DebugMenu
Stack item representing the debug menu.
Definition: debug_menu.hpp:20
ImGui::NewLine
IMGUI_API void NewLine()
Definition: imgui_widgets.cpp:1192
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
ImGui::SameLine
IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f)
Definition: imgui.cpp:7147
BlamRendering::RenderStack::StackObjectBase::z_order
int z_order
The Z-Order of the object.
Definition: render_stack.h:371
ImVec2
Definition: imgui.h:179
ImGuiTabBarFlags_NoTooltip
@ ImGuiTabBarFlags_NoTooltip
Definition: imgui.h:840
ImGui::IsItemHovered
IMGUI_API bool IsItemHovered(ImGuiHoveredFlags flags=0)
Definition: imgui.cpp:3061
ImGui::DragFloat
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::Begin
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
Definition: imgui.cpp:5397
debug_menu.hpp
BlamRendering::RenderStack::StackObjectBase::color
D2D1_COLOR_F color
The color of the object.
Definition: render_stack.h:370
ImGui::CollapsingHeader
IMGUI_API bool CollapsingHeader(const char *label, ImGuiTreeNodeFlags flags=0)
Definition: imgui_widgets.cpp:5422
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
ImGui::OpenPopup
IMGUI_API void OpenPopup(const char *str_id)
Definition: imgui.cpp:7453
ImGui::GetColumnWidth
IMGUI_API float GetColumnWidth(int column_index=-1)
Definition: imgui_widgets.cpp:7262
BlamRendering::RenderStack::Ellipse
Class containing data for an Ellipse object.
Definition: render_stack.h:521
y
font DisplayOffset y
Definition: README.txt:68
NULL
Add a fourth parameter to bake specific font ranges NULL
Definition: README.txt:57
Blam::DebugUI::Windows::RenderStackEditor::BasePropertiesTab
void BasePropertiesTab()
Shows properties that are part of BlamRendering::RenderStack::StackObjectBase.
Definition: render_stack_editor.hpp:359
ImGui::BeginTabBar
IMGUI_API bool BeginTabBar(const char *str_id, ImGuiTabBarFlags flags=0)
Definition: imgui_widgets.cpp:6366
ImGui::Text
IMGUI_API void Text(const char *fmt,...) IM_FMTARGS(1)
Definition: imgui_widgets.cpp:238
ImGui::PopTextWrapPos
IMGUI_API void PopTextWrapPos()
Definition: imgui.cpp:6313
Line
@ Line
Direct2D Line.
Definition: render_stack.h:65
ImGui::EndTooltip
IMGUI_API void EndTooltip()
Definition: imgui.cpp:7402
ImGui::BeginCombo
IMGUI_API bool BeginCombo(const char *label, const char *preview_value, ImGuiComboFlags flags=0)
Definition: imgui_widgets.cpp:1416
ImGui::Selectable
IMGUI_API bool Selectable(const char *label, bool selected=false, ImGuiSelectableFlags flags=0, const ImVec2 &size=ImVec2(0, 0))
Definition: imgui_widgets.cpp:5469
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
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
ImGui::Columns
IMGUI_API void Columns(int count=1, const char *id=NULL, bool border=true)
Definition: imgui_widgets.cpp:7572
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
ImGui::BulletText
IMGUI_API void BulletText(const char *fmt,...) IM_FMTARGS(1)
Definition: imgui_widgets.cpp:340
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
ImGui::EndCombo
IMGUI_API void EndCombo()
Definition: imgui_widgets.cpp:1522
BlamRendering::RenderStack::StackObjectBase::area
D2D1_RECT_F area
The area of the object.
Definition: render_stack.h:369
ImGui::EndTabBar
IMGUI_API void EndTabBar()
Definition: imgui_widgets.cpp:6432
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
ImGui::InputFloat2
IMGUI_API bool InputFloat2(const char *label, float v[2], const char *format="%.3f", ImGuiInputTextFlags flags=0)
Definition: imgui_widgets.cpp:2981
ImGui::ColorEdit4
IMGUI_API bool ColorEdit4(const char *label, float col[4], ImGuiColorEditFlags flags=0)
Definition: imgui_widgets.cpp:4154
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
Blam::Logger::LogEventForce
BLAM void LogEventForce(std::string message)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:258
BlamRendering::RenderStack::GetStackTypeLabel
BLAM std::string GetStackTypeLabel(StackType type)
Retrieves a string representation of the specified stack type.
Definition: render_stack.cpp:133
ImGui::Separator
IMGUI_API void Separator()
Definition: imgui_widgets.cpp:1284
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
ImGui::DragFloat4
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
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
ImGuiWindowFlags_NoResize
@ ImGuiWindowFlags_NoResize
Definition: imgui.h:715
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: ui.h:14
x
config GlyphExtraSpacing x
Definition: README.txt:30
BlamRendering::RenderStack::RoundedRectangle::PokeRoundedRectArea
void PokeRoundedRectArea()
Updates the area of the rounded rectangle after area modification.
Definition: RoundedRectangle.cpp:23
ImGui::SliderInt
IMGUI_API bool SliderInt(const char *label, int *v, int v_min, int v_max, const char *format="%d")
Definition: imgui_widgets.cpp:2649
ImGui::PushTextWrapPos
IMGUI_API void PushTextWrapPos(float wrap_local_pos_x=0.0f)
Definition: imgui.cpp:6306
Text
@ Text
Master text object that wraps around both BitmapText and DWText.
Definition: render_stack.h:73
ImGui::TextColored
IMGUI_API void TextColored(const ImVec4 &col, const char *fmt,...) IM_FMTARGS(2)
Definition: imgui_widgets.cpp:257
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
ImGui::InputFloat
IMGUI_API bool InputFloat(const char *label, float *v, float step=0.0f, float step_fast=0.0f, const char *format="%.3f", ImGuiInputTextFlags flags=0)
Definition: imgui_widgets.cpp:2975
ImGui::BeginTabItem
IMGUI_API bool BeginTabItem(const char *label, bool *p_open=NULL, ImGuiTabItemFlags flags=0)
Definition: imgui_widgets.cpp:6829
STACKTYPE_IMGUI
#define STACKTYPE_IMGUI
Definition: render_stack.h:14
ImGui::ListBoxHeader
IMGUI_API bool ListBoxHeader(const char *label, const ImVec2 &size=ImVec2(0, 0))
Definition: imgui_widgets.cpp:5614
ImGui::Button
IMGUI_API bool Button(const char *label, const ImVec2 &size=ImVec2(0, 0))
Definition: imgui_widgets.cpp:644
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