galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
ImGuiHelpers.cpp
Go to the documentation of this file.
1
7
8#include <ankerl/unordered_dense.h>
9#include <glad/glad.h>
10#include <imgui/imgui_freetype.h>
11#include <imgui/imgui_impl_glfw.h>
12#include <imgui/imgui_impl_opengl3.h>
13#include <imgui/imnotify/ImGuiNotify.hpp>
14
15#include "galaxy/core/ServiceLocator.hpp"
16#include "galaxy/core/Window.hpp"
17#include "galaxy/graphics/gl/Texture2D.hpp"
18#include "galaxy/graphics/RenderTexture.hpp"
21
22#include "ImGuiHelpers.hpp"
23
24#ifdef GALAXY_WIN_PLATFORM
25#pragma warning(push)
26#pragma warning(disable : 4312)
27#endif
28
29namespace galaxy
30{
31 void* ImGuiMemAllocFunc(size_t sz, void* user_data)
32 {
33 return mi_malloc(sz);
34 }
35
36 void ImGuiMemFreeFunc(void* ptr, void* user_data)
37 {
38 mi_free(ptr);
39 }
40
41 namespace ui
42 {
43 ImGuiIO& imgui_init_context(const char* ini)
44 {
45 // clang-format off
46 IMGUI_CHECKVERSION();
47 ImGui::SetAllocatorFunctions(ImGuiMemAllocFunc, ImGuiMemFreeFunc, nullptr);
48 ImGui::CreateContext();
49 ImGuiIO& io = ImGui::GetIO(); (void)io;
50 // clang-format on
51
52 io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
53 io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad;
54 io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;
55 io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable;
56
57 io.ConfigInputTextCursorBlink = true;
58 io.ConfigDockingWithShift = true;
59 io.ConfigDockingAlwaysTabBar = true;
60 io.MouseDrawCursor = false;
61 io.IniFilename = ini;
62
63 // When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones.
64 ImGuiStyle& style = ImGui::GetStyle();
65 if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
66 {
67 style.WindowRounding = 0.0f;
68 style.Colors[ImGuiCol_WindowBg].w = 1.0f;
69 }
70
71 auto& window = core::ServiceLocator<core::Window>::ref();
72 ImGui_ImplGlfw_InitForOpenGL(window.handle(), true);
73 ImGui_ImplOpenGL3_Init("#version 460 core");
74
75 ImGui::SetColorEditOptions(
76 ImGuiColorEditFlags_Uint8 | ImGuiColorEditFlags_DisplayRGB | ImGuiColorEditFlags_InputRGB | ImGuiColorEditFlags_PickerHueBar | ImGuiColorEditFlags_AlphaBar
77 );
78
81
82 return io;
83 }
84
86 {
87 ImGui_ImplOpenGL3_NewFrame();
88 ImGui_ImplGlfw_NewFrame();
89 ImGui::NewFrame();
90
91 const ImGuiViewport* imgui_viewport = ImGui::GetMainViewport();
92 ImGui::SetNextWindowPos(imgui_viewport->WorkPos);
93 ImGui::SetNextWindowSize(imgui_viewport->WorkSize);
94 ImGui::SetNextWindowViewport(imgui_viewport->ID);
95 }
96
98 {
99 ImGui::Render();
100 ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
101
102 // Update and Render additional Platform Windows
103 // (Platform functions may change the current OpenGL context, so we save/restore it to make it easier to paste this code elsewhere.
104 // For this specific demo app we could also call glfwMakeContextCurrent(window) directly)
105 const auto& io = ImGui::GetIO();
106 if (io.ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
107 {
108 GLFWwindow* backup_current_context = glfwGetCurrentContext();
109 ImGui::UpdatePlatformWindows();
110 ImGui::RenderPlatformWindowsDefault();
111 glfwMakeContextCurrent(backup_current_context);
112 }
113 }
114
116 {
117 ImGui_ImplOpenGL3_Shutdown();
118 ImGui_ImplGlfw_Shutdown();
119 ImGui::DestroyContext();
120 }
121
123 {
124 // Rounded Visual Studio style by RedNicStone from ImThemes
125 ImGuiStyle& style = ImGui::GetStyle();
126
127 style.Alpha = 1.0f;
128 style.DisabledAlpha = 0.6000000238418579f;
129 style.WindowPadding = ImVec2(8.0f, 8.0f);
130 style.WindowRounding = 4.0f;
131 style.WindowBorderSize = 0.0f;
132 style.WindowMinSize = ImVec2(32.0f, 32.0f);
133 style.WindowTitleAlign = ImVec2(0.0f, 0.5f);
134 style.WindowMenuButtonPosition = ImGuiDir_Left;
135 style.ChildRounding = 0.0f;
136 style.ChildBorderSize = 1.0f;
137 style.PopupRounding = 4.0f;
138 style.PopupBorderSize = 1.0f;
139 style.FramePadding = ImVec2(4.0f, 3.0f);
140 style.FrameRounding = 2.5f;
141 style.FrameBorderSize = 0.0f;
142 style.ItemSpacing = ImVec2(8.0f, 4.0f);
143 style.ItemInnerSpacing = ImVec2(4.0f, 4.0f);
144 style.CellPadding = ImVec2(4.0f, 2.0f);
145 style.IndentSpacing = 21.0f;
146 style.ColumnsMinSpacing = 6.0f;
147 style.ScrollbarSize = 11.0f;
148 style.ScrollbarRounding = 2.5f;
149 style.GrabMinSize = 10.0f;
150 style.GrabRounding = 2.0f;
151 style.TabRounding = 3.5f;
152 style.TabBorderSize = 0.0f;
153 style.TabMinWidthForCloseButton = 0.0f;
154 style.ColorButtonPosition = ImGuiDir_Right;
155 style.ButtonTextAlign = ImVec2(0.5f, 0.5f);
156 style.SelectableTextAlign = ImVec2(0.0f, 0.0f);
157
158 style.Colors[ImGuiCol_Text] = ImVec4(1.0f, 1.0f, 1.0f, 1.0f);
159 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.5921568870544434f, 0.5921568870544434f, 0.5921568870544434f, 1.0f);
160 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.1450980454683304f, 0.1450980454683304f, 0.1490196138620377f, 1.0f);
161 style.Colors[ImGuiCol_ChildBg] = ImVec4(0.1450980454683304f, 0.1450980454683304f, 0.1490196138620377f, 1.0f);
162 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.1450980454683304f, 0.1450980454683304f, 0.1490196138620377f, 1.0f);
163 style.Colors[ImGuiCol_Border] = ImVec4(0.3058823645114899f, 0.3058823645114899f, 0.3058823645114899f, 1.0f);
164 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.3058823645114899f, 0.3058823645114899f, 0.3058823645114899f, 1.0f);
165 style.Colors[ImGuiCol_FrameBg] = ImVec4(0.2000000029802322f, 0.2000000029802322f, 0.2156862765550613f, 1.0f);
166 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.1137254908680916f, 0.5921568870544434f, 0.9254902005195618f, 1.0f);
167 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.0f, 0.4666666686534882f, 0.7843137383460999f, 1.0f);
168 style.Colors[ImGuiCol_TitleBg] = ImVec4(0.1450980454683304f, 0.1450980454683304f, 0.1490196138620377f, 1.0f);
169 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.1450980454683304f, 0.1450980454683304f, 0.1490196138620377f, 1.0f);
170 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.1450980454683304f, 0.1450980454683304f, 0.1490196138620377f, 1.0f);
171 style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.2000000029802322f, 0.2000000029802322f, 0.2156862765550613f, 1.0f);
172 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.2000000029802322f, 0.2000000029802322f, 0.2156862765550613f, 1.0f);
173 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.321568638086319f, 0.321568638086319f, 0.3333333432674408f, 1.0f);
174 style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.3529411852359772f, 0.3529411852359772f, 0.3725490272045135f, 1.0f);
175 style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.3529411852359772f, 0.3529411852359772f, 0.3725490272045135f, 1.0f);
176 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.0f, 0.4666666686534882f, 0.7843137383460999f, 1.0f);
177 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.1137254908680916f, 0.5921568870544434f, 0.9254902005195618f, 1.0f);
178 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.0f, 0.4666666686534882f, 0.7843137383460999f, 1.0f);
179 style.Colors[ImGuiCol_Button] = ImVec4(0.2000000029802322f, 0.2000000029802322f, 0.2156862765550613f, 1.0f);
180 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.1137254908680916f, 0.5921568870544434f, 0.9254902005195618f, 1.0f);
181 style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.1137254908680916f, 0.5921568870544434f, 0.9254902005195618f, 1.0f);
182 style.Colors[ImGuiCol_Header] = ImVec4(0.2000000029802322f, 0.2000000029802322f, 0.2156862765550613f, 1.0f);
183 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.1137254908680916f, 0.5921568870544434f, 0.9254902005195618f, 1.0f);
184 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.0f, 0.4666666686534882f, 0.7843137383460999f, 1.0f);
185 style.Colors[ImGuiCol_Separator] = ImVec4(0.3058823645114899f, 0.3058823645114899f, 0.3058823645114899f, 1.0f);
186 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.3058823645114899f, 0.3058823645114899f, 0.3058823645114899f, 1.0f);
187 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.3058823645114899f, 0.3058823645114899f, 0.3058823645114899f, 1.0f);
188 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.1450980454683304f, 0.1450980454683304f, 0.1490196138620377f, 1.0f);
189 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.2000000029802322f, 0.2000000029802322f, 0.2156862765550613f, 1.0f);
190 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.321568638086319f, 0.321568638086319f, 0.3333333432674408f, 1.0f);
191 style.Colors[ImGuiCol_Tab] = ImVec4(0.1450980454683304f, 0.1450980454683304f, 0.1490196138620377f, 1.0f);
192 style.Colors[ImGuiCol_TabHovered] = ImVec4(0.1137254908680916f, 0.5921568870544434f, 0.9254902005195618f, 1.0f);
193 style.Colors[ImGuiCol_TabActive] = ImVec4(0.0f, 0.4666666686534882f, 0.7843137383460999f, 1.0f);
194 style.Colors[ImGuiCol_TabUnfocused] = ImVec4(0.1450980454683304f, 0.1450980454683304f, 0.1490196138620377f, 1.0f);
195 style.Colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.0f, 0.4666666686534882f, 0.7843137383460999f, 1.0f);
196 style.Colors[ImGuiCol_PlotLines] = ImVec4(0.0f, 0.4666666686534882f, 0.7843137383460999f, 1.0f);
197 style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.1137254908680916f, 0.5921568870544434f, 0.9254902005195618f, 1.0f);
198 style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.0f, 0.4666666686534882f, 0.7843137383460999f, 1.0f);
199 style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.1137254908680916f, 0.5921568870544434f, 0.9254902005195618f, 1.0f);
200 style.Colors[ImGuiCol_TableHeaderBg] = ImVec4(0.1882352977991104f, 0.1882352977991104f, 0.2000000029802322f, 1.0f);
201 style.Colors[ImGuiCol_TableBorderStrong] = ImVec4(0.3098039329051971f, 0.3098039329051971f, 0.3490196168422699f, 1.0f);
202 style.Colors[ImGuiCol_TableBorderLight] = ImVec4(0.2274509817361832f, 0.2274509817361832f, 0.2470588237047195f, 1.0f);
203 style.Colors[ImGuiCol_TableRowBg] = ImVec4(0.0f, 0.0f, 0.0f, 0.0f);
204 style.Colors[ImGuiCol_TableRowBgAlt] = ImVec4(1.0f, 1.0f, 1.0f, 0.05999999865889549f);
205 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.0f, 0.4666666686534882f, 0.7843137383460999f, 1.0f);
206 style.Colors[ImGuiCol_DragDropTarget] = ImVec4(0.1450980454683304f, 0.1450980454683304f, 0.1490196138620377f, 1.0f);
207 style.Colors[ImGuiCol_NavHighlight] = ImVec4(0.1450980454683304f, 0.1450980454683304f, 0.1490196138620377f, 1.0f);
208 style.Colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.0f, 1.0f, 1.0f, 0.699999988079071f);
209 style.Colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.800000011920929f, 0.800000011920929f, 0.800000011920929f, 0.2000000029802322f);
210 style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.1450980454683304f, 0.1450980454683304f, 0.1490196138620377f, 1.0f);
211 }
212
213 void imgui_popup(const char* id, bool& open, std::move_only_function<void(void)>&& func)
214 {
215 if (open)
216 {
217 ImGui::OpenPopup(id);
218 open = false;
219 }
220
222 if (ImGui::BeginPopup(id))
223 {
224 func();
225 ImGui::EndPopup();
226 }
227 }
228
229 void imgui_confirm(const char* msg, std::move_only_function<void(void)>&& yes, std::move_only_function<void(void)>&& no)
230 {
231 ImGui::Text(msg);
232
233 ImGui::Separator();
234 ImGui::Spacing();
235
236 if (ImGui::Button("Yes"))
237 {
238 if (yes)
239 {
240 yes();
241 }
242
243 ImGui::CloseCurrentPopup();
244 }
245
246 ImGui::SameLine();
247
248 if (ImGui::Button("No"))
249 {
250 if (no)
251 {
252 no();
253 }
254
255 ImGui::CloseCurrentPopup();
256 }
257 }
258
260 {
261 const auto center = ImGui::GetMainViewport()->GetCenter();
262 ImGui::SetNextWindowPos(center, ImGuiCond_Appearing, {0.5f, 0.5f});
263 }
264
266 {
267 auto& window = core::ServiceLocator<core::Window>::ref();
268 auto& io = ImGui::GetIO();
269
270 const auto scale = window.get_content_scale_max();
271 const auto font_size = std::floor(scale * 16.0f);
272
273 ImGui::GetStyle().ScaleAllSizes(scale);
274
275 ImFontConfig font_cfg = {};
276 font_cfg.FontDataOwnedByAtlas = false;
277 font_cfg.RasterizerMultiply = 1.5f;
278 font_cfg.OversampleH = 1;
279 font_cfg.OversampleV = 1;
280 font_cfg.FontBuilderFlags |= ImGuiFreeTypeBuilderFlags_LoadColor;
281 io.FontDefault = io.Fonts->AddFontFromMemoryTTF(&resource::roboto_light, resource::roboto_light_len, font_size, &font_cfg);
282
283 static const ImWchar icons_ranges[] = {ICON_MIN_MDI, ICON_MAX_MDI, 0};
284 ImFontConfig md_icons_cfg;
285 md_icons_cfg.FontDataOwnedByAtlas = false;
286 md_icons_cfg.MergeMode = true;
287 md_icons_cfg.PixelSnapH = true;
288 io.Fonts->AddFontFromMemoryTTF(&materialdesignicons_ttf, sizeof(materialdesignicons_ttf), font_size, &md_icons_cfg, icons_ranges);
289 }
290
292 {
293 return ImGui::GetCurrentContext() != nullptr;
294 }
295
296 bool imgui_imagebutton(const graphics::Texture2D& texture, const ImVec2& size, const ImVec4& bg_col, const ImVec4& tint_col)
297 {
298 const auto id = std::to_string(texture.id()) + std::to_string(texture.width()) + std::to_string(texture.height());
299 const auto upcast = static_cast<std::uint64_t>(texture.id());
300
301 return ImGui::ImageButton(id.c_str(), reinterpret_cast<void*>(upcast), size, {0, 1}, {1, 0}, bg_col, tint_col);
302 }
303
304 void imgui_image(const graphics::Texture2D& texture, const ImVec2& size)
305 {
306 const auto upcast = static_cast<std::uint64_t>(texture.id());
307 ImGui::Image(reinterpret_cast<void*>(upcast), size, {0, 1}, {1, 0});
308 }
309
310 void imgui_image(const graphics::RenderTexture& texture, const ImVec2& size)
311 {
312 const auto upcast = static_cast<std::uint64_t>(texture.texture());
313 ImGui::Image(reinterpret_cast<void*>(upcast), size, {0, 1}, {1, 0});
314 }
315
316 void imgui_notify_success(const char* msg)
317 {
318 ImGui::InsertNotification({ImGuiToastType::Warning, 2000, msg});
319 }
320
321 void imgui_notify_info(const char* msg)
322 {
323 ImGui::InsertNotification({ImGuiToastType::Info, 2000, msg});
324 }
325
326 void imgui_notify_warning(const char* msg)
327 {
328 ImGui::InsertNotification({ImGuiToastType::Warning, 2000, msg});
329 }
330
331 void imgui_notify_error(const char* msg)
332 {
333 ImGui::InsertNotification({ImGuiToastType::Error, 2000, msg});
334 }
335
336 bool imgui_glm_vec2(const char* label, glm::vec2& vec)
337 {
338 auto clicked = false;
339
340 ImGui::PushID(label);
341
342 ImGui::TextUnformatted(label);
343
344 ImGui::SameLine();
345
346 ImGui::SetNextItemWidth(150);
347 clicked |= ImGui::InputFloat("X", &vec.x, 1.0f, 10.0f, "%.1f");
348
349 ImGui::SameLine();
350
351 ImGui::SetNextItemWidth(150);
352 clicked |= ImGui::InputFloat("Y", &vec.y, 1.0f, 10.0f, "%.1f");
353
354 ImGui::PopID();
355 return clicked;
356 }
357
358 bool imgui_glm_vec3(const char* label, glm::vec3& vec)
359 {
360 auto clicked = false;
361
362 ImGui::PushID(label);
363
364 ImGui::TextUnformatted(label);
365
366 ImGui::SameLine();
367
368 ImGui::SetNextItemWidth(100);
369 clicked |= ImGui::InputFloat("X", &vec.x, 1.0f, 10.0f, "%.1f");
370
371 ImGui::SameLine();
372
373 ImGui::SetNextItemWidth(100);
374 clicked |= ImGui::InputFloat("Y", &vec.y, 1.0f, 10.0f, "%.1f");
375
376 ImGui::SameLine();
377
378 ImGui::SetNextItemWidth(100);
379 clicked |= ImGui::InputFloat("Z", &vec.z, 1.0f, 10.0f, "%.1f");
380
381 ImGui::PopID();
382 return clicked;
383 }
384
385 bool imgui_glm_vec4(const char* label, glm::vec4& vec)
386 {
387 auto clicked = false;
388
389 ImGui::PushID(label);
390
391 ImGui::TextUnformatted(label);
392
393 ImGui::SameLine();
394
395 ImGui::SetNextItemWidth(75);
396 clicked |= ImGui::InputFloat("X", &vec.x, 1.0f, 10.0f, "%.1f");
397
398 ImGui::SameLine();
399
400 ImGui::SetNextItemWidth(75);
401 clicked |= ImGui::InputFloat("Y", &vec.y, 1.0f, 10.0f, "%.1f");
402
403 ImGui::SameLine();
404
405 ImGui::SetNextItemWidth(75);
406 clicked |= ImGui::InputFloat("Z", &vec.z, 1.0f, 10.0f, "%.1f");
407
408 ImGui::SameLine();
409
410 ImGui::SetNextItemWidth(75);
411 clicked |= ImGui::InputFloat("W", &vec.w, 1.0f, 10.0f, "%.1f");
412
413 ImGui::PopID();
414 return clicked;
415 }
416
417 bool imgui_frect(const char* label, math::fRect& rect)
418 {
419 auto clicked = false;
420
421 ImGui::PushID(label);
422
423 ImGui::TextUnformatted(label);
424
425 ImGui::SameLine();
426
427 ImGui::SetNextItemWidth(75);
428 clicked |= ImGui::InputFloat("X", &rect.x, 1.0f, 10.0f, "%.1f");
429
430 ImGui::SameLine();
431
432 ImGui::SetNextItemWidth(75);
433 clicked |= ImGui::InputFloat("Y", &rect.y, 1.0f, 10.0f, "%.1f");
434
435 ImGui::SameLine();
436
437 ImGui::SetNextItemWidth(75);
438 clicked |= ImGui::InputFloat("W", &rect.width, 1.0f, 10.0f, "%.1f");
439
440 ImGui::SameLine();
441
442 ImGui::SetNextItemWidth(75);
443 clicked |= ImGui::InputFloat("H", &rect.height, 1.0f, 10.0f, "%.1f");
444
445 ImGui::PopID();
446 return clicked;
447 }
448 } // namespace ui
449} // namespace galaxy
450
451#ifdef GALAXY_WIN_PLATFORM
452#pragma warning(pop)
453#endif
static unsigned char roboto_light[]
static constexpr const unsigned int roboto_light_len
bool imgui_glm_vec2(const char *label, glm::vec2 &vec)
GLM vector 2 widget.
void imgui_notify_error(const char *msg)
ImGui error notification.
void imgui_set_theme()
Set our theme.
bool imgui_loaded()
Is ImGui loaded?
bool imgui_imagebutton(const graphics::Texture2D &texture, const ImVec2 &size, const ImVec4 &bg_col, const ImVec4 &tint_col)
Render an imgui image button with a galaxy texture.
bool imgui_glm_vec3(const char *label, glm::vec3 &vec)
GLM vector 3 widget.
void imgui_image(const graphics::Texture2D &texture, const ImVec2 &size)
Display a galaxy image with imgui.
void imgui_new_frame()
New imgui frame with galaxy.
void imgui_popup(const char *id, bool &open, std::move_only_function< void(void)> &&func)
Cleaner way of rendering an ImGui popup.
void imgui_center_next_window()
Make sure the next window opened is centered on the monitor.
ImGuiIO & imgui_init_context(const char *ini)
Initialize ImGui context with galaxy.
void imgui_notify_success(const char *msg)
ImGui success notification.
void imgui_destroy_context()
Cleanup imgui resources used by galaxy.
bool imgui_glm_vec4(const char *label, glm::vec4 &vec)
GLM vector 4 widget.
void scale_and_load_fonts()
Scale and load fonts.
void imgui_confirm(const char *msg, std::move_only_function< void(void)> &&yes, std::move_only_function< void(void)> &&no)
Handles a popup for a yes/no situation.
void imgui_notify_info(const char *msg)
ImGui info notification.
void imgui_notify_warning(const char *msg)
ImGui warning notification.
void imgui_render()
Render imgui with galaxy.
bool imgui_frect(const char *label, math::fRect &rect)
fRect widget.
Timer.hpp galaxy.
Definition Async.hpp:17
void * ImGuiMemAllocFunc(size_t sz, void *user_data)
void ImGuiMemFreeFunc(void *ptr, void *user_data)