-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEditorUI.cpp
More file actions
433 lines (389 loc) · 19.9 KB
/
Copy pathEditorUI.cpp
File metadata and controls
433 lines (389 loc) · 19.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
#include "EditorUI.h"
#include "Common.h"
#include "Scene.h"
#include "EngineBridge.h"
#include "FileDialogs.h"
#include "MathUtils.h"
#include "imgui.h"
#include "backends/imgui_impl_glfw.h"
#include "backends/imgui_impl_vulkan.h"
#include <numeric>
#include <algorithm>
#include <string>
#include <vector>
#include <filesystem>
extern void* g_AppLogoID;
static bool showAboutWindow = false;
static bool isFirstRunCheckDone = false;
static int renamingNodeIdx = -1;
struct ChangelogEntry {
std::string version;
std::string date;
std::vector<std::string> changes;
ChangelogEntry(std::string v, std::string d, std::vector<std::string> c)
: version(v), date(d), changes(c) {}
};
const std::vector<ChangelogEntry> appChangelog = {
ChangelogEntry("v1.2.1 - Optimization & Quality", "02.06.2026", {
"Implemented Bounding Sphere optimization (significant FPS boost)",
"Increased Raymarching steps from 32 to 128 (Ultra Quality)",
"Improved Shadow precision and resolution",
"Finer hit-threshold for smooth edges"
}),
ChangelogEntry("v1.2.0 - Core Modernization", "02.06.2026", {
"Integrated GLM for high-performance mathematics",
"Integrated spdlog for professional terminal logging",
"Integrated VMA (Vulkan Memory Allocator) for stable GPU memory management",
"Fixed hardcoded resource paths for improved portability",
"Major architectural refactoring (Renderer extraction)"
}),
ChangelogEntry("v1.1.0 - Hierarchy Fix", "10.01.2026", {
"Added Drag & Drop grouping",
"Fixed double-transform on parent/child selection",
"Added 'Unparent' area"
})
};
void DrawSceneNode(int nodeIdx);
void TextCentered(std::string text) {
float winWidth = ImGui::GetWindowSize().x;
float textWidth = ImGui::CalcTextSize(text.c_str()).x;
ImGui::SetCursorPosX((winWidth - textWidth) * 0.5f);
ImGui::Text("%s", text.c_str());
}
void renderAboutWindow() {
if (!showAboutWindow) return;
ImGuiIO& io = ImGui::GetIO();
ImVec2 size = ImVec2(io.DisplaySize.x * 0.9f, io.DisplaySize.y * 0.9f);
ImGui::SetNextWindowPos(ImVec2((io.DisplaySize.x - size.x) / 2.0f, (io.DisplaySize.y - size.y) / 2.0f), ImGuiCond_Appearing);
ImGui::SetNextWindowSize(size, ImGuiCond_Appearing);
if (ImGui::Begin("About Engine", &showAboutWindow, ImGuiWindowFlags_NoCollapse)) {
ImGui::Dummy(ImVec2(0, 50));
ImGui::SetWindowFontScale(2.0f);
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.28f, 0.56f, 0.90f, 1.0f));
TextCentered("NEXT LEVEL SDF ENGINE");
ImGui::PopStyleColor();
ImGui::SetWindowFontScale(1.0f);
ImGui::Dummy(ImVec2(0, 10));
TextCentered("Hierarchy Edition");
float buttonW = 200;
float buttonH = 40;
ImGui::SetCursorPosY(size.y - buttonH - 30);
ImGui::SetCursorPosX((size.x - buttonW) * 0.5f);
if (ImGui::Button("Close", ImVec2(buttonW, buttonH))) showAboutWindow = false;
}
ImGui::End();
}
void renderChangelogWindow() {
if (!showChangelog) return;
ImGui::SetNextWindowSize(ImVec2(400, 500), ImGuiCond_FirstUseEver);
if (ImGui::Begin("What's New?", &showChangelog, ImGuiWindowFlags_NoCollapse)) {
for (const auto& entry : appChangelog) {
ImGui::TextColored(ImVec4(0.28f, 0.56f, 0.90f, 1.0f), "%s", entry.version.c_str());
ImGui::SameLine(); ImGui::TextDisabled("(%s)", entry.date.c_str());
for (const auto& point : entry.changes) ImGui::BulletText("%s", point.c_str());
ImGui::Spacing(); ImGui::Separator(); ImGui::Spacing();
}
if (ImGui::Button("Close")) showChangelog = false;
}
ImGui::End();
}
void renderUI(GLFWwindow* window) {
ImGui_ImplVulkan_NewFrame();
ImGui_ImplGlfw_NewFrame();
ImGui::NewFrame();
setupImGuiStyle();
ImGuiIO& io = ImGui::GetIO();
if (!isFirstRunCheckDone) {
if (!std::filesystem::exists("imgui.ini")) showAboutWindow = true;
isFirstRunCheckDone = true;
}
float menuHeight = 0.0f;
if (ImGui::BeginMainMenuBar()) {
menuHeight = ImGui::GetWindowSize().y;
const char* modes[] = { "Object Editor", "Map Editor", "Game Build Editor" };
static int currentModeIdx = 0;
ImGui::PushItemWidth(150);
if (ImGui::Combo("##Mode", ¤tModeIdx, modes, IM_ARRAYSIZE(modes))) {
if (currentModeIdx == 0) currentEditorMode = EDITOR_OBJECT;
if (currentModeIdx == 1) currentEditorMode = EDITOR_MAP;
if (currentModeIdx == 2) currentEditorMode = EDITOR_GAME_BUILD;
}
ImGui::PopItemWidth();
ImGui::Separator();
if (ImGui::BeginMenu("File")) {
if (ImGui::MenuItem("Reset Scene")) { resetScene(); }
if (ImGui::MenuItem("Import .Nos")) { std::string path = FileDialogs::OpenFile(window, "NOS Scene File (*.nos)\0*.nos\0All Files (*.*)\0*.*\0"); if (!path.empty()) loadNos(path); }
if (ImGui::MenuItem("Export .Nos")) { std::string path = FileDialogs::SaveFile(window, "NOS Scene File (*.nos)\0*.nos\0", defaultExportPath); if (!path.empty()) { if (path.find(".nos") == std::string::npos) path += ".nos"; saveNos(path); } }
if (ImGui::BeginMenu("Help")) {
if (ImGui::MenuItem("Changelog")) showChangelog = true;
if (ImGui::MenuItem("About Engine")) showAboutWindow = true;
ImGui::EndMenu();
}
ImGui::Separator();
if (ImGui::MenuItem("Exit", "Alt+F4")) { glfwSetWindowShouldClose(window, true); }
ImGui::EndMenu();
}
if (ImGui::BeginMenu("Edit")) {
if (ImGui::MenuItem("Undo", "Ctrl+Z")) { performUndo(); }
ImGui::EndMenu();
}
float buttonWidth = 25.0f;
float totalWidth = 4 * buttonWidth + 3 * ImGui::GetStyle().ItemSpacing.x;
ImGui::SameLine(ImGui::GetWindowWidth() - totalWidth - 20.0f);
const char* labels[] = {"W", "S", "M", "R"};
for(int i=0; i<4; i++) {
if (ImGui::Button(labels[i], ImVec2(buttonWidth, 0))) currentShadingMode = i;
if(i < 3) ImGui::SameLine();
}
ImGui::EndMainMenuBar();
}
float headerHeight = 28.0f;
if (showToolSettings) {
ImGui::SetNextWindowPos(ImVec2(0, menuHeight));
ImGui::SetNextWindowSize(ImVec2(io.DisplaySize.x, headerHeight));
ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0.05f, 0.05f, 0.07f, guiAlpha));
ImGui::Begin("HeaderStrip", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse);
{
if(ImGui::Button("View")) { ImGui::OpenPopup("HeaderViewMenu"); }
if (ImGui::BeginPopup("HeaderViewMenu")) { ImGui::MenuItem("Toolbar", "T", &showToolbar); ImGui::MenuItem("Sidebar", "N", &showSidebar); ImGui::EndPopup(); }
ImGui::SameLine();
if(ImGui::Button("Select")) { ImGui::OpenPopup("SelectMenu"); }
if (ImGui::BeginPopup("SelectMenu")) { if(ImGui::MenuItem("All", "A")) { selectedIndices.resize(sceneGraph.size()); std::iota(selectedIndices.begin(), selectedIndices.end(), 0); } if(ImGui::MenuItem("None", "Alt+A")) { selectedIndices.clear(); } ImGui::EndPopup(); }
ImGui::SameLine();
if (ImGui::Button("Add")) { ImGui::OpenPopup("AddMenu"); }
if (ImGui::BeginPopup("AddMenu")) {
auto create = [&](const char* n, int t) {
saveUndo();
if (sceneGraph.size() < MAX_OBJECTS) {
SceneNode sn; sn.name = n; sn.gpuData.position.w = (float)t;
sn.gpuData.params = {1.0f,0,0,0}; sn.gpuData.color={1,1,1,1};
sn.localPosition.y = 2.0f;
sceneGraph.push_back(sn);
selectedIndices = {(int)sceneGraph.size()-1};
}
};
if (ImGui::MenuItem("Sphere")) create("Sphere", 0);
if (ImGui::MenuItem("Cube")) create("Cube", 1);
if (ImGui::MenuItem("Mesh (.obj)")) {
std::string path = FileDialogs::OpenFile(window, "OBJ Model (*.obj)\0*.obj\0All Files (*.*)\0*.*\0");
if (!path.empty()) loadMesh(path);
}
ImGui::EndPopup();
}
ImGui::SameLine();
if(ImGui::Button("Object")) { ImGui::OpenPopup("ObjectMenu"); }
if (ImGui::BeginPopup("ObjectMenu")) { if(ImGui::MenuItem("Duplicate", "Alt+D")) { duplicateSelectedObject(); } if(ImGui::MenuItem("Delete", "X")) { deleteSelectedObject(); } ImGui::EndPopup(); }
}
ImGui::End();
ImGui::PopStyleColor();
} else { headerHeight = 0.0f; }
float toolbarWidth = showToolbar ? 50.0f : 0.0f;
float rightPanelWidth = showSidebar ? 320.0f : 0.0f;
float margin = 10.0f;
float topOffset = menuHeight + headerHeight + (showToolSettings ? margin : 0);
float workspaceHeight = io.DisplaySize.y - topOffset;
if (showToolbar) {
ImGui::SetNextWindowPos(ImVec2(0, topOffset)); ImGui::SetNextWindowSize(ImVec2(toolbarWidth, workspaceHeight));
ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0.08f, 0.08f, 0.08f, guiAlpha));
ImGui::Begin("Tools", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoCollapse);
{
ImGui::Button("Mov", ImVec2(30, 30)); if(ImGui::IsItemClicked()) currentMode = MODE_MOVE;
ImGui::Button("Rot", ImVec2(30, 30)); if(ImGui::IsItemClicked()) currentMode = MODE_ROTATE;
ImGui::Button("Scl", ImVec2(30, 30)); if(ImGui::IsItemClicked()) currentMode = MODE_SCALE;
ImGui::Separator();
if (ImGui::Button("Giz", ImVec2(30, 30))) showGizmos = !showGizmos;
}
ImGui::End();
ImGui::PopStyleColor();
}
float rightX = io.DisplaySize.x - rightPanelWidth - margin;
if (showSidebar) {
float hierarchyHeight = workspaceHeight * 0.4f - margin * 1.5f;
float inspectorHeight = workspaceHeight * 0.6f - margin * 1.5f;
ImGui::SetNextWindowPos(ImVec2(rightX, topOffset)); ImGui::SetNextWindowSize(ImVec2(rightPanelWidth, hierarchyHeight));
ImGui::Begin("Scene Collection", nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoCollapse);
{
ImGui::TextDisabled("HIERARCHY");
ImGui::Separator();
ImGui::BeginChild("HierarchyScroll", ImVec2(0, 0), false, ImGuiWindowFlags_HorizontalScrollbar);
// Рендер корневых узлов
for (int i = 0; i < (int)sceneGraph.size(); i++) {
if (sceneGraph[i].parent == -1) DrawSceneNode(i);
}
// Зона для сброса в корень (Drop to Unparent)
ImGui::Dummy(ImVec2(ImGui::GetContentRegionAvail().x, 30.0f));
if (ImGui::BeginDragDropTarget()) {
if (const ImGuiPayload* payload = ImGui::AcceptDragDropPayload("SCENE_NODE")) {
int payloadIdx = *(const int*)payload->Data;
reparent(payloadIdx, -1); // Сброс родителя (стать сиротой)
}
ImGui::EndDragDropTarget();
}
ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 30.0f);
ImGui::TextDisabled("(Drop here to unparent)");
ImGui::EndChild();
}
ImGui::End();
ImGui::SetNextWindowPos(ImVec2(rightX, topOffset + hierarchyHeight + margin * 2)); ImGui::SetNextWindowSize(ImVec2(rightPanelWidth, inspectorHeight));
ImGui::Begin("Inspector", nullptr, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoCollapse);
{
if (!selectedIndices.empty()) {
int activeIdx = selectedIndices.back();
if (activeIdx < sceneGraph.size()) {
SceneNode& node = sceneGraph[activeIdx];
char nameBuf[128];
strncpy(nameBuf, node.name.c_str(), sizeof(nameBuf));
ImGui::PushItemWidth(-1);
if (ImGui::InputText("##ObjectName", nameBuf, sizeof(nameBuf))) {
node.name = nameBuf;
}
ImGui::PopItemWidth();
ImGui::Spacing();
ImGui::Separator();
if (node.meshIdx == -1) {
if (ImGui::CollapsingHeader("Geometry", ImGuiTreeNodeFlags_DefaultOpen)) {
const char* shapes[] = { "Sphere", "Box" };
int type = (int)node.gpuData.position.w;
if (ImGui::Combo("Shape", &type, shapes, 2)) node.gpuData.position.w = (float)type;
ImGui::DragFloat("Radius/Size", &node.gpuData.params.x, 0.05f);
ImGui::DragFloat("Smoothness", &node.gpuData.params.z, 0.01f, 0.0f, 2.0f);
}
} else {
if (ImGui::CollapsingHeader("Mesh Info", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::Text("Mesh ID: %d", node.meshIdx);
ImGui::Text("File: %s", meshCache[node.meshIdx].isLoaded ? "Loaded" : "Failed");
}
}
if (ImGui::CollapsingHeader("Material", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::ColorEdit3("Color", &node.gpuData.color.x);
ImGui::SliderFloat("Metallic", &node.gpuData.params.w, 0.0f, 1.0f);
}
if (ImGui::CollapsingHeader("Transform", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::DragFloat3("Pos", &node.localPosition.x, 0.05f);
ImGui::DragFloat3("Rot", &node.localRotation.x, 0.05f);
ImGui::DragFloat3("Scale", &node.localScale.x, 0.05f);
}
}
} else {
ImGui::TextDisabled("Select an object in hierarchy");
}
}
ImGui::End();
}
if (isBoxSelecting) {
ImDrawList* drawList = ImGui::GetForegroundDrawList();
ImVec2 p1(std::min((float)mousePressX, (float)currentMouseX), std::min((float)mousePressY, (float)currentMouseY));
ImVec2 p2(std::max((float)mousePressX, (float)currentMouseX), std::max((float)mousePressY, (float)currentMouseY));
drawList->AddRect(p1, p2, IM_COL32(255, 255, 255, 150), 0.0f, 0, 1.0f);
drawList->AddRectFilled(p1, p2, IM_COL32(255, 255, 255, 30));
}
ImDrawList* dl = ImGui::GetBackgroundDrawList();
int w, h; glfwGetFramebufferSize(window, &w, &h);
for (int idx : selectedIndices) {
if (idx >= sceneGraph.size()) continue;
const auto& od = sceneGraph[idx].gpuData;
vec3 pos = {od.position.x, od.position.y, od.position.z};
float size = od.params.x;
vec3 scl = {od.scale.x, od.scale.y, od.scale.z};
float sx = size * scl.x;
float sy = size * scl.y;
float sz = size * scl.z;
vec3 corners[8];
for(int i=0; i<8; i++) {
vec3 offset = { (i&1?sx:-sx), (i&2?sy:-sy), (i&4?sz:-sz) };
corners[i] = pos + offset;
}
ImVec2 minS = {10000, 10000}, maxS = {-10000, -10000}; bool visible = false;
for(int i=0; i<8; i++) { vec2 sPos; if(projectWorldToScreen(corners[i], (float)w, (float)h, sPos)) { minS.x = std::min(minS.x, sPos.x); minS.y = std::min(minS.y, sPos.y); maxS.x = std::max(maxS.x, sPos.x); maxS.y = std::max(maxS.y, sPos.y); visible = true; } }
if(visible && minS.x < maxS.x) { dl->AddRect(minS, maxS, IM_COL32(255, 140, 0, 200), 0.0f, 0, 2.0f); }
}
if (toast.active) {
ImGui::SetNextWindowPos(ImVec2(io.DisplaySize.x / 2 - 100, io.DisplaySize.y - 100));
ImGui::SetNextWindowSize(ImVec2(200, 40));
ImGui::Begin("Toast", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoDecoration);
TextCentered(toast.message);
ImGui::End();
toast.timer -= io.DeltaTime;
if (toast.timer <= 0) toast.active = false;
}
if (triggerSceneContextMenu) { ImGui::OpenPopup("SceneContextMenu"); triggerSceneContextMenu = false; }
if (ImGui::BeginPopup("SceneContextMenu")) { if (ImGui::MenuItem("Duplicate")) { duplicateSelectedObject(); } if (ImGui::MenuItem("Delete")) { deleteSelectedObject(); } ImGui::EndPopup(); }
renderChangelogWindow();
renderAboutWindow();
ImGui::Render();
}
void DrawSceneNode(int nodeIdx) {
if (nodeIdx >= sceneGraph.size()) return;
SceneNode& node = sceneGraph[nodeIdx];
ImGuiTreeNodeFlags flags = ImGuiTreeNodeFlags_OpenOnArrow | ImGuiTreeNodeFlags_SpanAvailWidth;
if (node.children.empty()) flags |= ImGuiTreeNodeFlags_Leaf;
bool isSelected = false;
for (int sel : selectedIndices) { if (sel == nodeIdx) { isSelected = true; break; } }
if (isSelected) flags |= ImGuiTreeNodeFlags_Selected;
if (renamingNodeIdx == nodeIdx) {
char buf[128];
strncpy(buf, node.name.c_str(), sizeof(buf));
ImGui::SetKeyboardFocusHere();
if (ImGui::InputText("##rename", buf, sizeof(buf), ImGuiInputTextFlags_EnterReturnsTrue)) {
node.name = buf;
renamingNodeIdx = -1;
}
if (!ImGui::IsItemActive() && ImGui::IsMouseClicked(0)) {
renamingNodeIdx = -1;
}
} else {
bool nodeOpen = ImGui::TreeNodeEx((void*)(intptr_t)nodeIdx, flags, "%s", node.name.c_str());
// --- DRAG AND DROP SOURCE ---
if (ImGui::BeginDragDropSource()) {
ImGui::SetDragDropPayload("SCENE_NODE", &nodeIdx, sizeof(int));
ImGui::Text("Move %s", node.name.c_str());
ImGui::EndDragDropSource();
}
// --- DRAG AND DROP TARGET ---
if (ImGui::BeginDragDropTarget()) {
if (const ImGuiPayload* payload = ImGui::AcceptDragDropPayload("SCENE_NODE")) {
int payloadIdx = *(const int*)payload->Data;
reparent(payloadIdx, nodeIdx);
}
ImGui::EndDragDropTarget();
}
if (ImGui::IsItemHovered() && ImGui::IsMouseDoubleClicked(0)) {
renamingNodeIdx = nodeIdx;
}
if (ImGui::IsItemClicked()) {
if (!ImGui::GetIO().KeyShift) selectedIndices.clear();
selectedIndices.push_back(nodeIdx);
}
if (ImGui::BeginPopupContextItem()) {
if (ImGui::MenuItem("Rename")) { renamingNodeIdx = nodeIdx; }
if (ImGui::MenuItem("Delete")) { deleteSelectedObject(); }
ImGui::EndPopup();
}
if (nodeOpen) {
for (int childIdx : node.children) DrawSceneNode(childIdx);
ImGui::TreePop();
}
}
}
void setupImGuiStyle() {
ImGuiStyle& style = ImGui::GetStyle();
style.WindowRounding = 0.0f;
style.FrameRounding = 3.0f;
style.WindowPadding = ImVec2(10, 10);
style.FramePadding = ImVec2(6, 4);
style.ItemSpacing = ImVec2(6, 6);
style.WindowBorderSize = 0.0f;
style.FrameBorderSize = 1.0f;
ImVec4* colors = style.Colors;
ImVec4 greyMedium = ImVec4(0.18f, 0.18f, 0.18f, guiAlpha);
ImVec4 bgAlpha = ImVec4(0.11f, 0.11f, 0.11f, guiAlpha);
ImVec4 textWhite = ImVec4(0.95f, 0.95f, 0.95f, 1.00f);
ImVec4 accentBlue = ImVec4(0.28f, 0.56f, 0.90f, 1.00f);
colors[ImGuiCol_WindowBg] = bgAlpha;
colors[ImGuiCol_Button] = greyMedium;
colors[ImGuiCol_ButtonActive] = ImVec4(0.45f, 0.45f, 0.45f, 1.0f);
colors[ImGuiCol_HeaderActive] = accentBlue;
colors[ImGuiCol_Text] = textWhite;
colors[ImGuiCol_TextSelectedBg] = accentBlue;
colors[ImGuiCol_MenuBarBg] = ImVec4(0.05f, 0.05f, 0.05f, 1.0f);
}