unity build! but not like that kind

This commit is contained in:
2026-02-23 01:25:53 -05:00
parent 1e724f6a2c
commit 9ed3407383
7 changed files with 258 additions and 193 deletions

2
.vscode/launch.json vendored
View File

@@ -8,7 +8,7 @@
"program": "${workspaceFolder}/build/autosample.exe", "program": "${workspaceFolder}/build/autosample.exe",
"args": [], "args": [],
"cwd": "${workspaceFolder}", "cwd": "${workspaceFolder}",
"preLaunchTask": "build" "preLaunchTask": "build-debug"
} }
] ]
} }

11
.vscode/tasks.json vendored
View File

@@ -16,7 +16,16 @@
"command": "${workspaceFolder}/nob.exe", "command": "${workspaceFolder}/nob.exe",
"group": "build", "group": "build",
"problemMatcher": "$msCompile", "problemMatcher": "$msCompile",
"detail": "Build autosample via nob" "detail": "Build autosample (release)"
},
{
"label": "build-debug",
"type": "shell",
"command": "${workspaceFolder}/nob.exe",
"args": ["debug"],
"group": "build",
"problemMatcher": "$msCompile",
"detail": "Build autosample (debug)"
}, },
{ {
"label": "rebuild", "label": "rebuild",

48
imgui.ini Normal file
View File

@@ -0,0 +1,48 @@
[Window][Browser]
Pos=0,0
Size=191,700
Collapsed=0
DockId=0x00000001,0
[Window][Main]
Pos=193,0
Size=868,523
Collapsed=0
DockId=0x00000005,0
[Window][Properties]
Pos=1063,0
Size=217,700
Collapsed=0
DockId=0x00000004,0
[Window][Log]
Pos=193,525
Size=868,175
Collapsed=0
DockId=0x00000006,0
[Window][WindowOverViewport_11111111]
Pos=0,0
Size=1280,700
Collapsed=0
[Window][Debug##Default]
Pos=60,60
Size=400,400
Collapsed=0
[Window][Dear ImGui Demo]
Pos=650,20
Size=550,680
Collapsed=0
[Docking][Data]
DockSpace ID=0xF8498067 Window=0x1BBC0F80 Pos=0,0 Size=1280,700 Split=X
DockNode ID=0x00000001 Parent=0xF8498067 SizeRef=191,700 Selected=0x54719807
DockNode ID=0x00000002 Parent=0xF8498067 SizeRef=1087,700 Split=X
DockNode ID=0x00000003 Parent=0x00000002 SizeRef=868,700 Split=Y
DockNode ID=0x00000005 Parent=0x00000003 SizeRef=868,523 CentralNode=1 Selected=0x3E095604
DockNode ID=0x00000006 Parent=0x00000003 SizeRef=868,175 Selected=0x139FDA3F
DockNode ID=0x00000004 Parent=0x00000002 SizeRef=217,700 Selected=0x8C72BEA8

80
nob.c
View File

@@ -5,12 +5,11 @@
#include "nob.h" #include "nob.h"
#define BUILD_DIR "build" #define BUILD_DIR "build"
#define IMGUI_LIB BUILD_DIR "/imgui.lib" #define IMGUI_LIB_DEBUG BUILD_DIR "/imgui_d.lib"
#define IMGUI_LIB_RELEASE BUILD_DIR "/imgui.lib"
static const char *src_files[] = { static const char *src_files[] = {
"src/main.cpp", "src/main.cpp",
"src/platform/platform_win32.cpp",
"src/renderer/renderer_dx12.cpp",
}; };
static const char *imgui_files[] = { static const char *imgui_files[] = {
@@ -34,27 +33,35 @@ static const char *link_libs[] = {
"dwmapi.lib", "dwmapi.lib",
}; };
static bool build_imgui_lib(void) { static const char *obj_name(const char *src_path) {
int need = nob_needs_rebuild(IMGUI_LIB, imgui_files, NOB_ARRAY_LEN(imgui_files)); const char *slash = strrchr(src_path, '/');
const char *name = slash ? slash + 1 : src_path;
size_t len = strlen(name);
return nob_temp_sprintf("%s/%.*s.obj", BUILD_DIR, (int)(len - 4), name);
}
static bool build_imgui_lib(bool debug) {
const char *lib_path = debug ? IMGUI_LIB_DEBUG : IMGUI_LIB_RELEASE;
int need = nob_needs_rebuild(lib_path, imgui_files, NOB_ARRAY_LEN(imgui_files));
if (need < 0) return false; if (need < 0) return false;
if (!need) { if (!need) {
nob_log(NOB_INFO, "%s is up to date", IMGUI_LIB); nob_log(NOB_INFO, "%s is up to date", lib_path);
return true; return true;
} }
nob_log(NOB_INFO, "Building %s...", IMGUI_LIB); nob_log(NOB_INFO, "Building %s...", lib_path);
// Compile each imgui source to .obj
Nob_Cmd cmd = {0}; Nob_Cmd cmd = {0};
nob_cmd_append(&cmd, "cl.exe"); nob_cmd_append(&cmd, "cl.exe");
nob_cmd_append(&cmd, "/nologo", "/std:c++17", "/EHsc", "/W3", "/c"); nob_cmd_append(&cmd, "/nologo", "/std:c++17", "/EHsc", "/W3", "/c");
nob_cmd_append(&cmd, "/Ivendor/imgui", "/Ivendor/imgui/backends"); nob_cmd_append(&cmd, "/Ivendor/imgui", "/Ivendor/imgui/backends");
#ifdef _DEBUG if (debug) {
nob_cmd_append(&cmd, "/Zi", "/Od", "/D_DEBUG"); nob_cmd_append(&cmd, "/Zi", "/Od", "/D_DEBUG");
#else } else {
nob_cmd_append(&cmd, "/O2", "/DNDEBUG"); nob_cmd_append(&cmd, "/O2", "/DNDEBUG");
#endif }
nob_cmd_append(&cmd, nob_temp_sprintf("/Fo:%s/", BUILD_DIR)); nob_cmd_append(&cmd, nob_temp_sprintf("/Fo:%s/", BUILD_DIR));
nob_cmd_append(&cmd, nob_temp_sprintf("/Fd:%s/", BUILD_DIR)); nob_cmd_append(&cmd, nob_temp_sprintf("/Fd:%s/", BUILD_DIR));
@@ -67,26 +74,16 @@ static bool build_imgui_lib(void) {
// Archive .obj files into a .lib // Archive .obj files into a .lib
cmd.count = 0; cmd.count = 0;
nob_cmd_append(&cmd, "lib.exe", "/nologo"); nob_cmd_append(&cmd, "lib.exe", "/nologo");
nob_cmd_append(&cmd, nob_temp_sprintf("/OUT:%s", IMGUI_LIB)); nob_cmd_append(&cmd, nob_temp_sprintf("/OUT:%s", lib_path));
for (size_t i = 0; i < NOB_ARRAY_LEN(imgui_files); i++) { for (size_t i = 0; i < NOB_ARRAY_LEN(imgui_files); i++)
const char *base = nob_temp_sprintf("%s", imgui_files[i]); nob_cmd_append(&cmd, obj_name(imgui_files[i]));
const char *slash = strrchr(base, '/');
const char *name = slash ? slash + 1 : base;
size_t len = strlen(name);
char *obj = nob_temp_sprintf("%s/%.*s.obj", BUILD_DIR, (int)(len - 4), name);
nob_cmd_append(&cmd, obj);
}
if (!nob_cmd_run(&cmd)) return false; if (!nob_cmd_run(&cmd)) return false;
// Clean up imgui .obj files // Clean up imgui .obj files
for (size_t i = 0; i < NOB_ARRAY_LEN(imgui_files); i++) { for (size_t i = 0; i < NOB_ARRAY_LEN(imgui_files); i++)
const char *slash = strrchr(imgui_files[i], '/'); nob_delete_file(obj_name(imgui_files[i]));
const char *name = slash ? slash + 1 : imgui_files[i];
size_t len = strlen(name);
nob_delete_file(nob_temp_sprintf("%s/%.*s.obj", BUILD_DIR, (int)(len - 4), name));
}
return true; return true;
} }
@@ -94,10 +91,15 @@ static bool build_imgui_lib(void) {
int main(int argc, char **argv) { int main(int argc, char **argv) {
NOB_GO_REBUILD_URSELF(argc, argv); NOB_GO_REBUILD_URSELF(argc, argv);
bool debug = false;
for (int i = 1; i < argc; i++) {
if (strcmp(argv[i], "debug") == 0) debug = true;
}
if (!nob_mkdir_if_not_exists(BUILD_DIR)) return 1; if (!nob_mkdir_if_not_exists(BUILD_DIR)) return 1;
// Build vendor libs (unless already built) // Build vendor libs (unless already built)
if (!build_imgui_lib()) return 1; if (!build_imgui_lib(debug)) return 1;
// Compile and link // Compile and link
Nob_Cmd cmd = {0}; Nob_Cmd cmd = {0};
@@ -106,11 +108,11 @@ int main(int argc, char **argv) {
nob_cmd_append(&cmd, "/nologo", "/std:c++17", "/EHsc", "/W3"); nob_cmd_append(&cmd, "/nologo", "/std:c++17", "/EHsc", "/W3");
nob_cmd_append(&cmd, "/Isrc", "/Ivendor/imgui", "/Ivendor/imgui/backends"); nob_cmd_append(&cmd, "/Isrc", "/Ivendor/imgui", "/Ivendor/imgui/backends");
#ifdef _DEBUG if (debug) {
nob_cmd_append(&cmd, "/Zi", "/Od", "/D_DEBUG"); nob_cmd_append(&cmd, "/Zi", "/Od", "/D_DEBUG");
#else } else {
nob_cmd_append(&cmd, "/Zi", "/O2", "/DNDEBUG"); nob_cmd_append(&cmd, "/Zi", "/O2", "/DNDEBUG");
#endif }
nob_cmd_append(&cmd, nob_temp_sprintf("/Fe:%s/autosample.exe", BUILD_DIR)); nob_cmd_append(&cmd, nob_temp_sprintf("/Fe:%s/autosample.exe", BUILD_DIR));
nob_cmd_append(&cmd, nob_temp_sprintf("/Fo:%s/", BUILD_DIR)); nob_cmd_append(&cmd, nob_temp_sprintf("/Fo:%s/", BUILD_DIR));
@@ -123,19 +125,15 @@ int main(int argc, char **argv) {
nob_cmd_append(&cmd, "/SUBSYSTEM:CONSOLE"); nob_cmd_append(&cmd, "/SUBSYSTEM:CONSOLE");
nob_cmd_append(&cmd, nob_temp_sprintf("/PDB:%s/autosample.pdb", BUILD_DIR)); nob_cmd_append(&cmd, nob_temp_sprintf("/PDB:%s/autosample.pdb", BUILD_DIR));
nob_cmd_append(&cmd, "/DEBUG"); nob_cmd_append(&cmd, "/DEBUG");
nob_cmd_append(&cmd, IMGUI_LIB); nob_cmd_append(&cmd, debug ? IMGUI_LIB_DEBUG : IMGUI_LIB_RELEASE);
for (size_t i = 0; i < NOB_ARRAY_LEN(link_libs); i++) for (size_t i = 0; i < NOB_ARRAY_LEN(link_libs); i++)
nob_cmd_append(&cmd, link_libs[i]); nob_cmd_append(&cmd, link_libs[i]);
if (!nob_cmd_run(&cmd)) return 1; if (!nob_cmd_run(&cmd)) return 1;
// Clean up .obj files // Clean up .obj files
for (size_t i = 0; i < NOB_ARRAY_LEN(src_files); i++) { for (size_t i = 0; i < NOB_ARRAY_LEN(src_files); i++)
const char *slash = strrchr(src_files[i], '/'); nob_delete_file(obj_name(src_files[i]));
const char *name = slash ? slash + 1 : src_files[i];
size_t len = strlen(name);
nob_delete_file(nob_temp_sprintf("%s/%.*s.obj", BUILD_DIR, (int)(len - 4), name));
}
nob_log(NOB_INFO, "Build complete: %s/autosample.exe", BUILD_DIR); nob_log(NOB_INFO, "Build complete: %s/autosample.exe", BUILD_DIR);
return 0; return 0;

View File

@@ -1,158 +1,15 @@
// Unity build - include all src files here
#include "platform/platform_win32.cpp"
#include "renderer/renderer_dx12.cpp"
#include "menus.cpp"
#include "theme.cpp"
// ---
#include "platform/platform.h" #include "platform/platform.h"
#include "renderer/renderer.h" #include "renderer/renderer.h"
#include "imgui.h" #include "imgui.h"
#include "imgui_internal.h" #include "imgui_internal.h"
enum MenuCmd {
MENU_NONE = 0,
MENU_FILE_NEW,
MENU_FILE_OPEN,
MENU_FILE_SAVE,
MENU_FILE_SAVE_AS,
MENU_FILE_EXIT,
MENU_IMPORT_AUDIO,
MENU_IMPORT_MIDI,
MENU_VIEW_BROWSER,
MENU_VIEW_PROPERTIES,
MENU_VIEW_LOG,
MENU_VIEW_DEMO,
};
static void setup_menus(PlatformWindow *window) {
PlatformMenuItem file_items[] = {
{ "New", MENU_FILE_NEW },
{ "Open...", MENU_FILE_OPEN },
{ "Save", MENU_FILE_SAVE },
{ "Save As...", MENU_FILE_SAVE_AS },
{ nullptr, 0 },
{ "Exit", MENU_FILE_EXIT },
};
PlatformMenuItem import_items[] = {
{ "Audio...", MENU_IMPORT_AUDIO },
{ "MIDI...", MENU_IMPORT_MIDI },
};
PlatformMenuItem view_items[] = {
{ "Browser", MENU_VIEW_BROWSER },
{ "Properties", MENU_VIEW_PROPERTIES },
{ "Log", MENU_VIEW_LOG },
{ nullptr, 0 },
{ "Demo", MENU_VIEW_DEMO },
};
PlatformMenu menus[] = {
{ "File", file_items, sizeof(file_items) / sizeof(file_items[0]) },
{ "Import", import_items, sizeof(import_items) / sizeof(import_items[0]) },
{ "View", view_items, sizeof(view_items) / sizeof(view_items[0]) },
};
platform_set_menu(window, menus, sizeof(menus) / sizeof(menus[0]));
}
static void setup_theme() {
ImGuiIO &io = ImGui::GetIO();
// Load Segoe UI from Windows system fonts
ImFontConfig font_cfg = {};
font_cfg.OversampleH = 2;
font_cfg.OversampleV = 1;
font_cfg.PixelSnapH = true;
io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\segoeui.ttf", 15.0f, &font_cfg);
// DAW-style dark theme
ImGuiStyle &s = ImGui::GetStyle();
// Geometry
s.WindowPadding = ImVec2(8, 8);
s.FramePadding = ImVec2(6, 4);
s.ItemSpacing = ImVec2(8, 4);
s.ItemInnerSpacing = ImVec2(4, 4);
s.ScrollbarSize = 12.0f;
s.GrabMinSize = 8.0f;
s.WindowBorderSize = 1.0f;
s.FrameBorderSize = 0.0f;
s.TabBorderSize = 0.0f;
s.WindowRounding = 2.0f;
s.FrameRounding = 2.0f;
s.GrabRounding = 2.0f;
s.TabRounding = 2.0f;
s.ScrollbarRounding = 2.0f;
ImVec4 *c = s.Colors;
// Backgrounds
c[ImGuiCol_WindowBg] = ImVec4(0.12f, 0.12f, 0.13f, 1.00f);
c[ImGuiCol_ChildBg] = ImVec4(0.12f, 0.12f, 0.13f, 1.00f);
c[ImGuiCol_PopupBg] = ImVec4(0.15f, 0.15f, 0.16f, 1.00f);
// Borders
c[ImGuiCol_Border] = ImVec4(0.22f, 0.22f, 0.24f, 1.00f);
c[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
// Text
c[ImGuiCol_Text] = ImVec4(0.88f, 0.88f, 0.88f, 1.00f);
c[ImGuiCol_TextDisabled] = ImVec4(0.44f, 0.44f, 0.44f, 1.00f);
// Headers (collapsing headers, menu bar items)
c[ImGuiCol_Header] = ImVec4(0.20f, 0.20f, 0.22f, 1.00f);
c[ImGuiCol_HeaderHovered] = ImVec4(0.28f, 0.28f, 0.30f, 1.00f);
c[ImGuiCol_HeaderActive] = ImVec4(0.24f, 0.24f, 0.26f, 1.00f);
// Buttons
c[ImGuiCol_Button] = ImVec4(0.22f, 0.22f, 0.24f, 1.00f);
c[ImGuiCol_ButtonHovered] = ImVec4(0.30f, 0.30f, 0.33f, 1.00f);
c[ImGuiCol_ButtonActive] = ImVec4(0.26f, 0.26f, 0.28f, 1.00f);
// Frame backgrounds (inputs, checkboxes, sliders)
c[ImGuiCol_FrameBg] = ImVec4(0.16f, 0.16f, 0.17f, 1.00f);
c[ImGuiCol_FrameBgHovered] = ImVec4(0.20f, 0.20f, 0.22f, 1.00f);
c[ImGuiCol_FrameBgActive] = ImVec4(0.18f, 0.18f, 0.20f, 1.00f);
// Tabs
c[ImGuiCol_Tab] = ImVec4(0.16f, 0.16f, 0.17f, 1.00f);
c[ImGuiCol_TabHovered] = ImVec4(0.28f, 0.28f, 0.30f, 1.00f);
c[ImGuiCol_TabSelected] = ImVec4(0.20f, 0.20f, 0.22f, 1.00f);
c[ImGuiCol_TabSelectedOverline] = ImVec4(0.34f, 0.54f, 0.69f, 1.00f);
c[ImGuiCol_TabDimmed] = ImVec4(0.12f, 0.12f, 0.13f, 1.00f);
c[ImGuiCol_TabDimmedSelected] = ImVec4(0.16f, 0.16f, 0.17f, 1.00f);
// Title bar
c[ImGuiCol_TitleBg] = ImVec4(0.10f, 0.10f, 0.11f, 1.00f);
c[ImGuiCol_TitleBgActive] = ImVec4(0.13f, 0.13f, 0.14f, 1.00f);
c[ImGuiCol_TitleBgCollapsed] = ImVec4(0.10f, 0.10f, 0.11f, 1.00f);
// Scrollbar
c[ImGuiCol_ScrollbarBg] = ImVec4(0.10f, 0.10f, 0.11f, 1.00f);
c[ImGuiCol_ScrollbarGrab] = ImVec4(0.24f, 0.24f, 0.26f, 1.00f);
c[ImGuiCol_ScrollbarGrabHovered]= ImVec4(0.30f, 0.30f, 0.33f, 1.00f);
c[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.34f, 0.34f, 0.37f, 1.00f);
// Slider grab
c[ImGuiCol_SliderGrab] = ImVec4(0.34f, 0.54f, 0.69f, 1.00f);
c[ImGuiCol_SliderGrabActive] = ImVec4(0.40f, 0.60f, 0.75f, 1.00f);
// Checkmark, accent
c[ImGuiCol_CheckMark] = ImVec4(0.34f, 0.54f, 0.69f, 1.00f);
// Separator
c[ImGuiCol_Separator] = ImVec4(0.22f, 0.22f, 0.24f, 1.00f);
c[ImGuiCol_SeparatorHovered] = ImVec4(0.34f, 0.54f, 0.69f, 1.00f);
c[ImGuiCol_SeparatorActive] = ImVec4(0.34f, 0.54f, 0.69f, 1.00f);
// Resize grip
c[ImGuiCol_ResizeGrip] = ImVec4(0.22f, 0.22f, 0.24f, 0.50f);
c[ImGuiCol_ResizeGripHovered] = ImVec4(0.34f, 0.54f, 0.69f, 0.67f);
c[ImGuiCol_ResizeGripActive] = ImVec4(0.34f, 0.54f, 0.69f, 0.95f);
// Docking
c[ImGuiCol_DockingPreview] = ImVec4(0.34f, 0.54f, 0.69f, 0.70f);
c[ImGuiCol_DockingEmptyBg] = ImVec4(0.10f, 0.10f, 0.11f, 1.00f);
// Menu bar
c[ImGuiCol_MenuBarBg] = ImVec4(0.14f, 0.14f, 0.15f, 1.00f);
}
static void build_default_layout(ImGuiID dockspace_id) { static void build_default_layout(ImGuiID dockspace_id) {
ImGui::DockBuilderRemoveNode(dockspace_id); ImGui::DockBuilderRemoveNode(dockspace_id);
ImGui::DockBuilderAddNode(dockspace_id, ImGuiDockNodeFlags_DockSpace); ImGui::DockBuilderAddNode(dockspace_id, ImGuiDockNodeFlags_DockSpace);
@@ -172,6 +29,7 @@ static void build_default_layout(ImGuiID dockspace_id) {
} }
int main(int argc, char **argv) { int main(int argc, char **argv) {
(void)argc; (void)argc;
(void)argv; (void)argv;

48
src/menus.cpp Normal file
View File

@@ -0,0 +1,48 @@
#include "platform/platform.h"
enum MenuCmd {
MENU_NONE = 0,
MENU_FILE_NEW,
MENU_FILE_OPEN,
MENU_FILE_SAVE,
MENU_FILE_SAVE_AS,
MENU_FILE_EXIT,
MENU_IMPORT_AUDIO,
MENU_IMPORT_MIDI,
MENU_VIEW_BROWSER,
MENU_VIEW_PROPERTIES,
MENU_VIEW_LOG,
MENU_VIEW_DEMO,
};
static void setup_menus(PlatformWindow *window) {
PlatformMenuItem file_items[] = {
{ "New", MENU_FILE_NEW },
{ "Open...", MENU_FILE_OPEN },
{ "Save", MENU_FILE_SAVE },
{ "Save As...", MENU_FILE_SAVE_AS },
{ nullptr, 0 },
{ "Exit", MENU_FILE_EXIT },
};
PlatformMenuItem import_items[] = {
{ "Audio...", MENU_IMPORT_AUDIO },
{ "MIDI...", MENU_IMPORT_MIDI },
};
PlatformMenuItem view_items[] = {
{ "Browser", MENU_VIEW_BROWSER },
{ "Properties", MENU_VIEW_PROPERTIES },
{ "Log", MENU_VIEW_LOG },
{ nullptr, 0 },
{ "Demo", MENU_VIEW_DEMO },
};
PlatformMenu menus[] = {
{ "File", file_items, sizeof(file_items) / sizeof(file_items[0]) },
{ "Import", import_items, sizeof(import_items) / sizeof(import_items[0]) },
{ "View", view_items, sizeof(view_items) / sizeof(view_items[0]) },
};
platform_set_menu(window, menus, sizeof(menus) / sizeof(menus[0]));
}

104
src/theme.cpp Normal file
View File

@@ -0,0 +1,104 @@
#include "imgui.h"
static void setup_theme() {
ImGuiIO &io = ImGui::GetIO();
// Load Segoe UI from Windows system fonts
ImFontConfig font_cfg = {};
font_cfg.OversampleH = 2;
font_cfg.OversampleV = 1;
font_cfg.PixelSnapH = true;
io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\segoeui.ttf", 15.0f, &font_cfg);
// DAW-style dark theme
ImGuiStyle &s = ImGui::GetStyle();
// Geometry
s.WindowPadding = ImVec2(8, 8);
s.FramePadding = ImVec2(6, 4);
s.ItemSpacing = ImVec2(8, 4);
s.ItemInnerSpacing = ImVec2(4, 4);
s.ScrollbarSize = 12.0f;
s.GrabMinSize = 8.0f;
s.WindowBorderSize = 1.0f;
s.FrameBorderSize = 0.0f;
s.TabBorderSize = 0.0f;
s.WindowRounding = 2.0f;
s.FrameRounding = 2.0f;
s.GrabRounding = 2.0f;
s.TabRounding = 2.0f;
s.ScrollbarRounding = 2.0f;
ImVec4 *c = s.Colors;
// Backgrounds
c[ImGuiCol_WindowBg] = ImVec4(0.12f, 0.12f, 0.13f, 1.00f);
c[ImGuiCol_ChildBg] = ImVec4(0.12f, 0.12f, 0.13f, 1.00f);
c[ImGuiCol_PopupBg] = ImVec4(0.15f, 0.15f, 0.16f, 1.00f);
// Borders
c[ImGuiCol_Border] = ImVec4(0.22f, 0.22f, 0.24f, 1.00f);
c[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
// Text
c[ImGuiCol_Text] = ImVec4(0.88f, 0.88f, 0.88f, 1.00f);
c[ImGuiCol_TextDisabled] = ImVec4(0.44f, 0.44f, 0.44f, 1.00f);
// Headers (collapsing headers, menu bar items)
c[ImGuiCol_Header] = ImVec4(0.20f, 0.20f, 0.22f, 1.00f);
c[ImGuiCol_HeaderHovered] = ImVec4(0.28f, 0.28f, 0.30f, 1.00f);
c[ImGuiCol_HeaderActive] = ImVec4(0.24f, 0.24f, 0.26f, 1.00f);
// Buttons
c[ImGuiCol_Button] = ImVec4(0.22f, 0.22f, 0.24f, 1.00f);
c[ImGuiCol_ButtonHovered] = ImVec4(0.30f, 0.30f, 0.33f, 1.00f);
c[ImGuiCol_ButtonActive] = ImVec4(0.26f, 0.26f, 0.28f, 1.00f);
// Frame backgrounds (inputs, checkboxes, sliders)
c[ImGuiCol_FrameBg] = ImVec4(0.16f, 0.16f, 0.17f, 1.00f);
c[ImGuiCol_FrameBgHovered] = ImVec4(0.20f, 0.20f, 0.22f, 1.00f);
c[ImGuiCol_FrameBgActive] = ImVec4(0.18f, 0.18f, 0.20f, 1.00f);
// Tabs
c[ImGuiCol_Tab] = ImVec4(0.16f, 0.16f, 0.17f, 1.00f);
c[ImGuiCol_TabHovered] = ImVec4(0.28f, 0.28f, 0.30f, 1.00f);
c[ImGuiCol_TabSelected] = ImVec4(0.20f, 0.20f, 0.22f, 1.00f);
c[ImGuiCol_TabSelectedOverline] = ImVec4(0.34f, 0.54f, 0.69f, 1.00f);
c[ImGuiCol_TabDimmed] = ImVec4(0.12f, 0.12f, 0.13f, 1.00f);
c[ImGuiCol_TabDimmedSelected] = ImVec4(0.16f, 0.16f, 0.17f, 1.00f);
// Title bar
c[ImGuiCol_TitleBg] = ImVec4(0.10f, 0.10f, 0.11f, 1.00f);
c[ImGuiCol_TitleBgActive] = ImVec4(0.13f, 0.13f, 0.14f, 1.00f);
c[ImGuiCol_TitleBgCollapsed] = ImVec4(0.10f, 0.10f, 0.11f, 1.00f);
// Scrollbar
c[ImGuiCol_ScrollbarBg] = ImVec4(0.10f, 0.10f, 0.11f, 1.00f);
c[ImGuiCol_ScrollbarGrab] = ImVec4(0.24f, 0.24f, 0.26f, 1.00f);
c[ImGuiCol_ScrollbarGrabHovered]= ImVec4(0.30f, 0.30f, 0.33f, 1.00f);
c[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.34f, 0.34f, 0.37f, 1.00f);
// Slider grab
c[ImGuiCol_SliderGrab] = ImVec4(0.34f, 0.54f, 0.69f, 1.00f);
c[ImGuiCol_SliderGrabActive] = ImVec4(0.40f, 0.60f, 0.75f, 1.00f);
// Checkmark, accent
c[ImGuiCol_CheckMark] = ImVec4(0.34f, 0.54f, 0.69f, 1.00f);
// Separator
c[ImGuiCol_Separator] = ImVec4(0.22f, 0.22f, 0.24f, 1.00f);
c[ImGuiCol_SeparatorHovered] = ImVec4(0.34f, 0.54f, 0.69f, 1.00f);
c[ImGuiCol_SeparatorActive] = ImVec4(0.34f, 0.54f, 0.69f, 1.00f);
// Resize grip
c[ImGuiCol_ResizeGrip] = ImVec4(0.22f, 0.22f, 0.24f, 0.50f);
c[ImGuiCol_ResizeGripHovered] = ImVec4(0.34f, 0.54f, 0.69f, 0.67f);
c[ImGuiCol_ResizeGripActive] = ImVec4(0.34f, 0.54f, 0.69f, 0.95f);
// Docking
c[ImGuiCol_DockingPreview] = ImVec4(0.34f, 0.54f, 0.69f, 0.70f);
c[ImGuiCol_DockingEmptyBg] = ImVec4(0.10f, 0.10f, 0.11f, 1.00f);
// Menu bar
c[ImGuiCol_MenuBarBg] = ImVec4(0.14f, 0.14f, 0.15f, 1.00f);
}