|
@@ -95,6 +95,55 @@ int UI::initialize() {
|
95
|
95
|
|
96
|
96
|
stbi_image_free(tex_data);
|
97
|
97
|
|
|
98
|
+ // Set up OpenRaider style
|
|
99
|
+ ImGuiStyle& style = ImGui::GetStyle();
|
|
100
|
+ style.Colors[ImGuiCol_Text] = ImVec4(0.90f, 0.90f, 0.90f, 1.00f);
|
|
101
|
+ style.Colors[ImGuiCol_WindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 1.00f);
|
|
102
|
+ style.Colors[ImGuiCol_Border] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
|
|
103
|
+ style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.60f);
|
|
104
|
+ style.Colors[ImGuiCol_FrameBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.30f);
|
|
105
|
+ style.Colors[ImGuiCol_TitleBg] = ImVec4(0.50f, 0.70f, 1.00f, 0.45f);
|
|
106
|
+ style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.40f, 0.65f, 1.00f, 0.20f);
|
|
107
|
+ style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.40f, 0.65f, 1.00f, 0.15f);
|
|
108
|
+ style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.40f, 0.65f, 1.00f, 0.30f);
|
|
109
|
+ style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.40f, 0.65f, 1.00f, 0.40f);
|
|
110
|
+ style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(1.00f, 0.16f, 0.16f, 0.40f);
|
|
111
|
+ style.Colors[ImGuiCol_ComboBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.99f);
|
|
112
|
+ style.Colors[ImGuiCol_CheckHovered] = ImVec4(1.00f, 0.40f, 0.40f, 0.45f);
|
|
113
|
+ style.Colors[ImGuiCol_CheckActive] = ImVec4(0.65f, 0.50f, 0.50f, 0.55f);
|
|
114
|
+ style.Colors[ImGuiCol_CheckMark] = ImVec4(0.90f, 0.90f, 0.90f, 0.50f);
|
|
115
|
+ style.Colors[ImGuiCol_SliderGrab] = ImVec4(1.00f, 1.00f, 1.00f, 0.30f);
|
|
116
|
+ style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(1.00f, 0.20f, 0.22f, 1.00f);
|
|
117
|
+ style.Colors[ImGuiCol_Button] = ImVec4(1.00f, 0.20f, 0.20f, 0.60f);
|
|
118
|
+ style.Colors[ImGuiCol_ButtonHovered] = ImVec4(1.00f, 0.20f, 0.18f, 1.00f);
|
|
119
|
+ style.Colors[ImGuiCol_ButtonActive] = ImVec4(1.00f, 0.00f, 0.00f, 1.00f);
|
|
120
|
+ style.Colors[ImGuiCol_Header] = ImVec4(0.21f, 0.54f, 1.00f, 0.45f);
|
|
121
|
+ style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.22f, 0.56f, 1.00f, 0.80f);
|
|
122
|
+ style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.00f, 0.31f, 1.00f, 1.00f);
|
|
123
|
+ style.Colors[ImGuiCol_Column] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
|
|
124
|
+ style.Colors[ImGuiCol_ColumnHovered] = ImVec4(0.60f, 0.40f, 0.40f, 1.00f);
|
|
125
|
+ style.Colors[ImGuiCol_ColumnActive] = ImVec4(0.80f, 0.50f, 0.50f, 1.00f);
|
|
126
|
+ style.Colors[ImGuiCol_ResizeGrip] = ImVec4(1.00f, 1.00f, 1.00f, 0.30f);
|
|
127
|
+ style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(1.00f, 1.00f, 1.00f, 0.60f);
|
|
128
|
+ style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(1.00f, 1.00f, 1.00f, 0.90f);
|
|
129
|
+ style.Colors[ImGuiCol_CloseButton] = ImVec4(0.21f, 0.56f, 1.00f, 0.50f);
|
|
130
|
+ style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.21f, 0.32f, 1.00f, 0.60f);
|
|
131
|
+ style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.70f, 0.70f, 0.70f, 1.00f);
|
|
132
|
+ style.Colors[ImGuiCol_PlotLines] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
|
|
133
|
+ style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
|
|
134
|
+ style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
|
|
135
|
+ style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
|
|
136
|
+ style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.00f, 0.00f, 1.00f, 0.35f);
|
|
137
|
+ style.Colors[ImGuiCol_TooltipBg] = ImVec4(0.05f, 0.05f, 0.10f, 0.90f);
|
|
138
|
+ style.WindowPadding = ImVec2(2, 2);
|
|
139
|
+ style.WindowRounding = 9;
|
|
140
|
+ style.FramePadding = ImVec2(2, 1);
|
|
141
|
+ style.ItemSpacing = ImVec2(2, 2);
|
|
142
|
+ style.ItemInnerSpacing = ImVec2(1, 1);
|
|
143
|
+ style.TouchExtraPadding = ImVec2(0, 0);
|
|
144
|
+ style.TreeNodeSpacing = 3;
|
|
145
|
+ style.ScrollBarWidth = 10;
|
|
146
|
+
|
98
|
147
|
return 0;
|
99
|
148
|
}
|
100
|
149
|
|
|
@@ -224,6 +273,7 @@ void UI::display() {
|
224
|
273
|
}
|
225
|
274
|
|
226
|
275
|
static bool showTestWindow = false;
|
|
276
|
+ static bool showStyleWindow = false;
|
227
|
277
|
if (ImGui::Begin("Engine", &visible, ImVec2(400, 400))) {
|
228
|
278
|
Render::displayUI();
|
229
|
279
|
RunTime::display();
|
|
@@ -456,6 +506,10 @@ void UI::display() {
|
456
|
506
|
if (ImGui::Button("Show/Hide Test Window")) {
|
457
|
507
|
showTestWindow = !showTestWindow;
|
458
|
508
|
}
|
|
509
|
+ ImGui::SameLine();
|
|
510
|
+ if (ImGui::Button("Show/Hide Style Editor")) {
|
|
511
|
+ showStyleWindow = !showStyleWindow;
|
|
512
|
+ }
|
459
|
513
|
}
|
460
|
514
|
}
|
461
|
515
|
ImGui::End();
|
|
@@ -463,6 +517,9 @@ void UI::display() {
|
463
|
517
|
if (showTestWindow)
|
464
|
518
|
ImGui::ShowTestWindow();
|
465
|
519
|
|
|
520
|
+ if (showStyleWindow)
|
|
521
|
+ ImGui::ShowStyleEditor();
|
|
522
|
+
|
466
|
523
|
ImGui::Render();
|
467
|
524
|
}
|
468
|
525
|
|