Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
imguistyleserializer.cpp
Go to the documentation of this file.
1// USAGE (tested with ImGui library v1.21 wip):
2/*
31) Compile this cpp file
42) In your main.cpp just add (without including any additional file: there's no header!):
5extern bool ImGuiSaveStyle(const char* filename,const ImGuiStyle& style);
6extern bool ImGuiLoadStyle(const char* filename,ImGuiStyle& style);
73) Use them together with ImGui::GetStyle() to save/load the current style.
8 ImGui::GetStyle() returns a reference of the current style that can be set/get.
9
10Please note that other style options are not globally serializable because they are "window flags",
11that must be set on a per-window basis (for example border,titlebar,scrollbar,resizable,movable,per-window alpha).
12
13To edit and save a style, you can use the default ImGui example and append to the "Debug" window the following code:
14 ImGui::Text("\n");
15 ImGui::Text("Please modify the current style in:");
16 ImGui::Text("ImGui Test->Window Options->Style Editor");
17 static bool loadCurrentStyle = false;
18 static bool saveCurrentStyle = false;
19 static bool resetCurrentStyle = false;
20 loadCurrentStyle = ImGui::Button("Load Saved Style");
21 saveCurrentStyle = ImGui::Button("Save Current Style");
22 resetCurrentStyle = ImGui::Button("Reset Current Style");
23 if (loadCurrentStyle) {
24 if (!ImGuiLoadStyle("./myimgui.style",ImGui::GetStyle())) {
25 fprintf(stderr,"Warning: \"./myimgui.style\" not present.\n");
26 }
27 }
28 if (saveCurrentStyle) {
29 if (!ImGuiSaveStyle("./myimgui.style",ImGui::GetStyle())) {
30 fprintf(stderr,"Warning: \"./myimgui.style\" cannot be saved.\n");
31 }
32 }
33 if (resetCurrentStyle) ImGui::GetStyle() = ImGuiStyle();
34*/
35
36#ifndef IMGUI_API
37#include <imgui.h>
38#endif //IMGUI_API
39
41
42// From <imgui.cpp>:--------------------------------------------------------
43#ifndef IM_ARRAYSIZE
44#include <stdio.h> // vsnprintf
45#define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR)/sizeof(*_ARR)))
46static size_t ImFormatString(char* buf, size_t buf_size, const char* fmt, ...)
47{
48 va_list args;
49 va_start(args, fmt);
50 int w = vsnprintf(buf, buf_size, fmt, args);
51 va_end(args);
52 buf[buf_size-1] = 0;
53 return (w == -1) ? buf_size : (size_t)w;
54}
55#endif //IM_ARRAYSIZE
56//---------------------------------------------------------------------------
57
58#include <cstdio>
59#include <string.h>
60
61#include "imgui_internal.h"
62
63namespace ImGui {
64
65#ifndef NO_IMGUISTYLESERIALIZER_SAVESTYLE
66bool SaveStyle(const char* filename,const ImGuiStyle& style)
67{
68 // Write .style file
69 FILE* f = fopen(filename, "wt");
70 if (!f) return false;
71
72 fprintf(f, "[Alpha]\n%1.3f\n", style.Alpha);
73 fprintf(f, "[WindowPadding]\n%1.3f %1.3f\n", style.WindowPadding.x,style.WindowPadding.y);
74 fprintf(f, "[WindowRounding]\n%1.3f\n", style.WindowRounding);
75 fprintf(f, "[WindowBorderSize]\n%1.3f\n", style.WindowBorderSize);
76 fprintf(f, "[WindowMinSize]\n%1.3f %1.3f\n", style.WindowMinSize.x,style.WindowMinSize.y);
77 fprintf(f, "[WindowMenuButtonPosition]\n%d\n", style.WindowMenuButtonPosition);
78 fprintf(f, "[ChildRounding]\n%1.3f\n", style.ChildRounding);
79 fprintf(f, "[ChildBorderSize]\n%1.3f\n", style.ChildBorderSize);
80 fprintf(f, "[PopupRounding]\n%1.3f\n", style.PopupRounding);
81 fprintf(f, "[PopupBorderSize]\n%1.3f\n", style.PopupBorderSize);
82 fprintf(f, "[FramePadding]\n%1.3f %1.3f\n", style.FramePadding.x,style.FramePadding.y);
83 fprintf(f, "[FrameRounding]\n%1.3f\n", style.FrameRounding);
84 fprintf(f, "[FrameBorderSize]\n%1.3f\n", style.FrameBorderSize);
85 fprintf(f, "[ItemSpacing]\n%1.3f %1.3f\n", style.ItemSpacing.x,style.ItemSpacing.y);
86 fprintf(f, "[ItemInnerSpacing]\n%1.3f %1.3f\n", style.ItemInnerSpacing.x,style.ItemInnerSpacing.y);
87 fprintf(f, "[TouchExtraPadding]\n%1.3f %1.3f\n", style.TouchExtraPadding.x,style.TouchExtraPadding.y);
88 //fprintf(f, "[WindowFillAlphaDefault]\n%1.3f\n", style.WindowFillAlphaDefault);
89 fprintf(f, "[ScrollbarRounding]\n%1.3f\n", style.ScrollbarRounding);
90 fprintf(f, "[WindowTitleAlign]\n%1.3f %1.3f\n", style.WindowTitleAlign.x,style.WindowTitleAlign.y);
91 fprintf(f, "[ButtonTextAlign]\n%1.3f %1.3f\n", style.ButtonTextAlign.x,style.ButtonTextAlign.y);
92 fprintf(f, "[IndentSpacing]\n%1.3f\n", style.IndentSpacing);
93 fprintf(f, "[ColumnsMinSpacing]\n%1.3f\n", style.ColumnsMinSpacing);
94 fprintf(f, "[ScrollbarSize]\n%1.3f\n", style.ScrollbarSize);
95 fprintf(f, "[GrabMinSize]\n%1.3f\n", style.GrabMinSize);
96 fprintf(f, "[GrabRounding]\n%1.3f\n", style.GrabRounding);
97 fprintf(f, "[TabRounding]\n%1.3f\n", style.TabRounding);
98 fprintf(f, "[TabBorderSize]\n%1.3f\n", style.TabBorderSize);
99 fprintf(f, "[TabMinWidthForCloseButton]\n%1.3f",style.TabMinWidthForCloseButton);
100 fprintf(f, "[ColorButtonPosition]\n%d\n", style.ColorButtonPosition);
101 fprintf(f, "[SelectableTextAlign]\n%1.3f %1.3f\n", style.SelectableTextAlign.x,style.SelectableTextAlign.y);
102 fprintf(f, "[DisplayWindowPadding]\n%1.3f %1.3f\n", style.DisplayWindowPadding.x,style.DisplaySafeAreaPadding.y);
103 fprintf(f, "[DisplaySafeAreaPadding]\n%1.3f %1.3f\n", style.DisplaySafeAreaPadding.x,style.DisplaySafeAreaPadding.y);
104 fprintf(f, "[AntiAliasedLines]\n%d\n", style.AntiAliasedLines?1:0);
105 fprintf(f, "[AntiAliasedLinesUseTex]\n%d\n", style.AntiAliasedLinesUseTex?1:0);
106 fprintf(f, "[AntiAliasedFill]\n%d\n", style.AntiAliasedFill?1:0);
107 fprintf(f, "[CurveTessellationTol]\n%1.3f\n", style.CurveTessellationTol);
108 fprintf(f, "[CircleTessellationMaxError]\n%1.3f\n", style.CircleTessellationMaxError);
109
110 for (size_t i = 0; i != ImGuiCol_COUNT; i++)
111 {
112 const ImVec4& c = style.Colors[i];
113 fprintf(f, "[%s]\n", ImGui::GetStyleColorName(i));//ImGuiColNames[i]);
114 fprintf(f, "%1.3f %1.3f %1.3f %1.3f\n",c.x,c.y,c.z,c.w);
115 }
116
117 fprintf(f,"\n");
118 fclose(f);
119
120 return true;
121}
122#endif //NO_IMGUISTYLESERIALIZER_SAVESTYLE
123#ifndef NO_IMGUISTYLESERIALIZER_LOADSTYLE
124bool LoadStyle(const char* filename,ImGuiStyle& style)
125{
126 // Load .style file
127 if (!filename) return false;
128
129 // Load file into memory
130 FILE* f;
131 if ((f = fopen(filename, "rt")) == NULL) return false;
132 if (fseek(f, 0, SEEK_END)) {
133 fclose(f);
134 return false;
135 }
136 const long f_size_signed = ftell(f);
137 if (f_size_signed == -1) {
138 fclose(f);
139 return false;
140 }
141 size_t f_size = (size_t)f_size_signed;
142 if (fseek(f, 0, SEEK_SET)) {
143 fclose(f);
144 return false;
145 }
146 char* f_data = (char*)ImGui::MemAlloc(f_size+1);
147 f_size = fread(f_data, 1, f_size, f); // Text conversion alter read size so let's not be fussy about return value
148 fclose(f);
149 if (f_size == 0) {
150 ImGui::MemFree(f_data);
151 return false;
152 }
153 f_data[f_size] = 0;
154
155 float WindowFillAlphaDefault = -1.f; // fallback for reloading an older file
156 // Parse file in memory
157 char name[128];name[0]='\0';
158 const char* buf_end = f_data + f_size;
159 for (const char* line_start = f_data; line_start < buf_end; )
160 {
161 const char* line_end = line_start;
162 while (line_end < buf_end && *line_end != '\n' && *line_end != '\r')
163 line_end++;
164
165 if (name[0]=='\0' && line_start[0] == '[' && line_end > line_start && line_end[-1] == ']')
166 {
167 ImFormatString(name, IM_ARRAYSIZE(name), "%.*s", (int)(line_end-line_start-2), line_start+1);
168 //fprintf(stderr,"name: %s\n",name); // dbg
169 }
170 else if (name[0]!='\0')
171 {
172
173 float *pf[4]= {0,0,0,0};
174 int npf = 0;
175 int *pi[4]={0,0,0,0};
176 int npi = 0;
177 bool *pb[4]= {0,0,0,0};
178 int npb = 0;
179
180 // parsing 'name' here by filling the fields above
181 {
182 if (strcmp(name, "Alpha")==0) {npf=1;pf[0]=&style.Alpha;}
183 else if (strcmp(name, "WindowPadding")==0) {npf=2;pf[0]=&style.WindowPadding.x;pf[1]=&style.WindowPadding.y;}
184 else if (strcmp(name, "WindowRounding")==0) {npf=1;pf[0]=&style.WindowRounding;}
185 else if (strcmp(name, "WindowBorderSize")==0) {npf=1;pf[0]=&style.WindowBorderSize;}
186 else if (strcmp(name, "WindowMinSize")==0) {npf=2;pf[0]=&style.WindowMinSize.x;pf[1]=&style.WindowMinSize.y;}
187 else if (strcmp(name, "WindowMenuButtonPosition")==0) {npi=1;pi[0]=&style.WindowMenuButtonPosition;}
188 else if (strcmp(name, "ChildRounding")==0 ||
189 strcmp(name, "ChildWindowRounding")==0) {npf=1;pf[0]=&style.ChildRounding;}
190 else if (strcmp(name, "ChildBorderSize")==0) {npf=1;pf[0]=&style.ChildBorderSize;}
191 else if (strcmp(name, "PopupRounding")==0) {npf=1;pf[0]=&style.PopupRounding;}
192 else if (strcmp(name, "PopupBorderSize")==0) {npf=1;pf[0]=&style.PopupBorderSize;}
193 else if (strcmp(name, "FramePadding")==0) {npf=2;pf[0]=&style.FramePadding.x;pf[1]=&style.FramePadding.y;}
194 else if (strcmp(name, "FrameRounding")==0) {npf=1;pf[0]=&style.FrameRounding;}
195 else if (strcmp(name, "FrameBorderSize")==0) {npf=1;pf[0]=&style.FrameBorderSize;}
196 else if (strcmp(name, "ItemSpacing")==0) {npf=2;pf[0]=&style.ItemSpacing.x;pf[1]=&style.ItemSpacing.y;}
197 else if (strcmp(name, "ItemInnerSpacing")==0) {npf=2;pf[0]=&style.ItemInnerSpacing.x;pf[1]=&style.ItemInnerSpacing.y;}
198 else if (strcmp(name, "IndentSpacing")==0) {npf=1;pf[0]=&style.IndentSpacing;}
199 else if (strcmp(name, "TouchExtraPadding")==0) {npf=2;pf[0]=&style.TouchExtraPadding.x;pf[1]=&style.TouchExtraPadding.y;}
200 else if (strcmp(name, "WindowFillAlphaDefault")==0) {npf=1;pf[0]=&WindowFillAlphaDefault;}
201 else if (strcmp(name, "ScrollbarRounding")==0) {npf=1;pf[0]=&style.ScrollbarRounding;}
202 else if (strcmp(name, "WindowTitleAlign")==0) {npf=2;pf[0]=&style.WindowTitleAlign.x;pf[1]=&style.WindowTitleAlign.y;}
203 else if (strcmp(name, "ButtonTextAlign")==0) {npf=2;pf[0]=&style.ButtonTextAlign.x;pf[1]=&style.ButtonTextAlign.y;}
204 else if (strcmp(name, "ColumnsMinSpacing")==0) {npf=1;pf[0]=&style.ColumnsMinSpacing;}
205 else if (strcmp(name, "ScrollbarSize")==0) {npf=1;pf[0]=&style.ScrollbarSize;}
206 else if (strcmp(name, "GrabMinSize")==0) {npf=1;pf[0]=&style.GrabMinSize;}
207 else if (strcmp(name, "GrabRounding")==0) {npf=1;pf[0]=&style.GrabRounding;}
208 else if (strcmp(name, "DisplayWindowPadding")==0) {npf=2;pf[0]=&style.DisplayWindowPadding.x;pf[1]=&style.DisplayWindowPadding.y;}
209 else if (strcmp(name, "DisplaySafeAreaPadding")==0) {npf=2;pf[0]=&style.DisplaySafeAreaPadding.x;pf[1]=&style.DisplaySafeAreaPadding.y;}
210 else if (strcmp(name, "AntiAliasedLines")==0) {npb=1;pb[0]=&style.AntiAliasedLines;}
211 else if (strcmp(name, "AntiAliasedLinesUseTex")==0) {npb=1;pb[0]=&style.AntiAliasedLinesUseTex;}
212 else if (strcmp(name, "AntiAliasedFill")==0 || strcmp(name, "AntiAliasedShapes")==0) {npb=1;pb[0]=&style.AntiAliasedFill;}
213 else if (strcmp(name, "CurveTessellationTol")==0) {npf=1;pf[0]=&style.CurveTessellationTol;}
214 else if (strcmp(name, "CircleSegmentMaxError")==0) {npf=1;pf[0]=&style.CircleTessellationMaxError;}
215 else if (strcmp(name, "CircleTessellationMaxError")==0) {npf=1;pf[0]=&style.CircleTessellationMaxError;}
216 else if (strcmp(name, "TabRounding")==0) {npf=1;pf[0]=&style.TabRounding;}
217 else if (strcmp(name, "TabBorderSize")==0) {npf=1;pf[0]=&style.TabBorderSize;}
218 else if (strcmp(name, "TabMinWidthForUnselectedCloseButton")==0 ||
219 strcmp(name, "TabMinWidthForCloseButton")==0) {npf=1;pf[0]=&style.TabMinWidthForCloseButton;}
220 else if (strcmp(name, "ColorButtonPosition")==0) {npi=1;pi[0]=&style.ColorButtonPosition;}
221 else if (strcmp(name, "SelectableTextAlign")==0) {npf=2;pf[0]=&style.SelectableTextAlign.x;pf[1]=&style.SelectableTextAlign.y;}
222 // all the colors here
223 else {
224 for (int j=0;j<ImGuiCol_COUNT;j++) {
225 if (strcmp(name,ImGui::GetStyleColorName(j))==0) {
226 npf = 4;
227 ImVec4& color = style.Colors[j];
228 pf[0]=&color.x;pf[1]=&color.y;pf[2]=&color.z;pf[3]=&color.w;
229 break;
230 }
231 // Fallback for old files -----------------------------------
232 else if (strcmp(name,"TooltipBg")==0) {
233 npf = 4;
234 ImVec4& color = style.Colors[ImGuiCol_PopupBg];
235 pf[0]=&color.x;pf[1]=&color.y;pf[2]=&color.z;pf[3]=&color.w;
236 break;
237 }
238 else if (strcmp(name,"Column")==0) {
239 npf = 4;
240 ImVec4& color = style.Colors[ImGuiCol_Separator];
241 pf[0]=&color.x;pf[1]=&color.y;pf[2]=&color.z;pf[3]=&color.w;
242 break;
243 }
244 else if (strcmp(name,"ColumnActive")==0) {
245 npf = 4;
246 ImVec4& color = style.Colors[ImGuiCol_SeparatorActive];
247 pf[0]=&color.x;pf[1]=&color.y;pf[2]=&color.z;pf[3]=&color.w;
248 break;
249 }
250 else if (strcmp(name,"ModalWindowDarkening")==0) {
251 npf = 4;
252 ImVec4& color = style.Colors[ImGuiCol_ModalWindowDimBg];
253 pf[0]=&color.x;pf[1]=&color.y;pf[2]=&color.z;pf[3]=&color.w;
254 break;
255 }
256 else if (strcmp(name,"ColumnHovered")==0) {
257 npf = 4;
258 ImVec4& color = style.Colors[ImGuiCol_SeparatorHovered];
259 pf[0]=&color.x;pf[1]=&color.y;pf[2]=&color.z;pf[3]=&color.w;
260 break;
261 }
262 /* // ImGuiCol_ComboBg has been removed in favour of ImGuiCol_PopupBg.
263 // So it's better not to use the serilized ImGuiCol_ComboBg anymore
264 else if (strcmp(name,"ComboBg")==0) {
265 npf = 4;
266 ImVec4& color = style.Colors[ImGuiCol_PopupBg];
267 pf[0]=&color.x;pf[1]=&color.y;pf[2]=&color.z;pf[3]=&color.w;
268 break;
269 }*/
270 // -----------------------------------------------------------
271 }
272 }
273 }
274
275 //fprintf(stderr,"name: %s npf=%d\n",name,npf); // dbg
276 // parsing values here and filling pf[]
277 float x=0.f,y=0.f,z=0.f,w=0.f;
278 int xi=0,yi=0,zi=0,wi=0;
279 switch (npf) {
280 case 1:
281 if (sscanf(line_start, "%f", &x) == npf) {
282 *pf[0] = x;
283 }
284 else fprintf(stderr,"Warning in ImGui::LoadStyle(\"%s\"): skipped [%s] (parsing error).\n",filename,name);
285 break;
286 case 2:
287 if (sscanf(line_start, "%f %f", &x, &y) == npf) {
288 *pf[0] = x;*pf[1] = y;
289 }
290 else fprintf(stderr,"Warning in ImGui::LoadStyle(\"%s\"): skipped [%s] (parsing error).\n",filename,name);
291 break;
292 case 3:
293 if (sscanf(line_start, "%f %f %f", &x, &y, &z) == npf) {
294 *pf[0] = x;*pf[1] = y;*pf[2] = z;
295 }
296 else fprintf(stderr,"Warning in ImGui::LoadStyle(\"%s\"): skipped [%s] (parsing error).\n",filename,name);
297 break;
298 case 4:
299 if (sscanf(line_start, "%f %f %f %f", &x, &y, &z, &w) == npf) {
300 *pf[0] = x;*pf[1] = y;*pf[2] = z;*pf[3] = w;
301 }
302 else fprintf(stderr,"Warning in ImGui::LoadStyle(\"%s\"): skipped [%s] (parsing error).\n",filename,name);
303 break;
304 default:
305 switch (npi) {
306 case 1:
307 if (sscanf(line_start, "%d", &xi) == npi) {
308 *pi[0] = xi;
309 }
310 else fprintf(stderr,"Warning in ImGui::LoadStyle(\"%s\"): skipped [%s] (parsing error).\n",filename,name);
311 break;
312 case 2:
313 if (sscanf(line_start, "%d %d", &xi, &yi) == npi) {
314 *pi[0] = xi;*pi[1] = yi;
315 }
316 else fprintf(stderr,"Warning in ImGui::LoadStyle(\"%s\"): skipped [%s] (parsing error).\n",filename,name);
317 break;
318 case 3:
319 if (sscanf(line_start, "%d %d %d", &xi, &yi, &zi) == npi) {
320 *pi[0] = xi;*pi[1] = yi;*pi[2] = zi;
321 }
322 else fprintf(stderr,"Warning in ImGui::LoadStyle(\"%s\"): skipped [%s] (parsing error).\n",filename,name);
323 break;
324 case 4:
325 if (sscanf(line_start, "%d %d %d %d", &xi, &yi, &zi, &wi) == npi) {
326 *pi[0] = xi;*pi[1] = yi;*pi[2] = zi;*pi[3] = wi;
327 }
328 else fprintf(stderr,"Warning in ImGui::LoadStyle(\"%s\"): skipped [%s] (parsing error).\n",filename,name);
329 break;
330 default:
331 switch (npb) {
332 case 1:
333 if (sscanf(line_start, "%d", &xi) == npb) {
334 *pb[0] = (xi!=0);
335 }
336 else fprintf(stderr,"Warning in ImGui::LoadStyle(\"%s\"): skipped [%s] (parsing error).\n",filename,name);
337 break;
338 case 2:
339 if (sscanf(line_start, "%d %d", &xi, &yi) == npb) {
340 *pb[0] = (xi!=0);*pb[1] = (yi!=0);
341 }
342 else fprintf(stderr,"Warning in ImGui::LoadStyle(\"%s\"): skipped [%s] (parsing error).\n",filename,name);
343 break;
344 case 3:
345 if (sscanf(line_start, "%d %d %d", &xi, &yi, &zi) == npb) {
346 *pb[0] = (xi!=0);*pb[1] = (yi!=0);*pb[2] = (zi!=0);
347 }
348 else fprintf(stderr,"Warning in ImGui::LoadStyle(\"%s\"): skipped [%s] (parsing error).\n",filename,name);
349 break;
350 case 4:
351 if (sscanf(line_start, "%d %d %d %d", &xi, &yi, &zi, &wi) == npb) {
352 *pb[0] = (xi!=0);*pb[1] = (yi!=0);*pb[2] = (zi!=0);*pb[3] = (wi!=0);
353 }
354 else fprintf(stderr,"Warning in ImGui::LoadStyle(\"%s\"): skipped [%s] (parsing error).\n",filename,name);
355 break;
356 default:
357 fprintf(stderr,"Warning in ImGui::LoadStyle(\"%s\"): skipped [%s] (unknown field).\n",filename,name);
358 break;
359 }
360 break;
361 }
362 break;
363 }
364 /*
365 // Same reference code from <imgui.cpp> to help parsing
366 float x, y;
367 int i;
368 if (sscanf(line_start, "Pos=%f,%f", &x, &y) == 2)
369 settings->Pos = ImVec2(x, y);
370 else if (sscanf(line_start, "Size=%f,%f", &x, &y) == 2)
371 settings->Size = ImMax(ImVec2(x, y), g.Style.WindowMinSize);
372 else if (sscanf(line_start, "Collapsed=%d", &i) == 1)
373 settings->Collapsed = (i != 0);
374 */
375 //---------------------------------------------------------------------------------
376 // Fix backward compatibility a bit
377 if (style.WindowTitleAlign.x<0 || style.WindowTitleAlign.x>1) style.WindowTitleAlign.x = 0.f;
378 if (style.WindowTitleAlign.y<0 || style.WindowTitleAlign.y>1) style.WindowTitleAlign.y = 0.5f;
379 //---------------------------------------------------------------------------------
380 // Fix FLT_MAX restoring
381 if (style.TabMinWidthForCloseButton>(FLT_MAX-0.002f)) style.TabMinWidthForCloseButton=FLT_MAX;
382 //---------------------------------------------------------------------------------
383 name[0]='\0'; // mandatory
384 }
385
386 line_start = line_end+1;
387 }
388
389 if (WindowFillAlphaDefault>=0.f) style.Colors[ImGuiCol_WindowBg].w*=WindowFillAlphaDefault;
390
391 // Release memory
392 ImGui::MemFree(f_data);
393 return true;
394}
395#endif //NO_IMGUISTYLESERIALIZER_LOADSTYLE
396
397
398// @dougbinks (https://github.com/ocornut/imgui/issues/438)
399void ChangeStyleColors(ImGuiStyle& style,float satThresholdForInvertingLuminance,float shiftHue) {
400 if (satThresholdForInvertingLuminance>=1.f && shiftHue==0.f) return;
401 for (int i = 0; i < ImGuiCol_COUNT; i++) {
402 ImVec4& col = style.Colors[i];
403 float H, S, V;
404 ImGui::ColorConvertRGBtoHSV( col.x, col.y, col.z, H, S, V );
405 if( S <= satThresholdForInvertingLuminance) { V = 1.0 - V; }
406 if (shiftHue) {H+=shiftHue;if (H>1) H-=1.f;else if (H<0) H+=1.f;}
407 ImGui::ColorConvertHSVtoRGB( H, S, V, col.x, col.y, col.z );
408 }
409}
410static inline void InvertStyleColors(ImGuiStyle& style) {ChangeStyleColors(style,.1f,0.f);}
411static inline void ChangeStyleColorsHue(ImGuiStyle& style,float shiftHue=0.f) {ChangeStyleColors(style,0.f,shiftHue);}
412static inline ImVec4 ConvertTitleBgColFromPrevVersion(const ImVec4& win_bg_col, const ImVec4& title_bg_col) {
413 float new_a = 1.0f - ((1.0f - win_bg_col.w) * (1.0f - title_bg_col.w)), k = title_bg_col.w / new_a;
414 return ImVec4((win_bg_col.x * win_bg_col.w + title_bg_col.x) * k, (win_bg_col.y * win_bg_col.w + title_bg_col.y) * k, (win_bg_col.z * win_bg_col.w + title_bg_col.z) * k, new_a);
415}
416
417/* clone of ImLerp(...) in imgui_internal.h */
418static inline ImVec4 ImColorLerp(const ImVec4& a, const ImVec4& b, float t) { return ImVec4(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t, a.z + (b.z - a.z) * t, a.w + (b.w - a.w) * t); }
419static inline void CreateDefaultTabColorsFor(ImGuiStyle& style,ImGuiCol baseHoveredColor=ImGuiCol_HeaderHovered,float hoveredLerp=0.5f,const ImVec2& tabsLerps=ImVec2(0.15f,0.8f),const ImVec2& unfocusedTabsLerp=ImVec2(0.1f,0.5f)) {
420 IM_ASSERT(baseHoveredColor+1<ImGuiCol_COUNT);
421 style.Colors[ImGuiCol_TabHovered] = ImColorLerp(style.Colors[baseHoveredColor], style.Colors[baseHoveredColor+1], hoveredLerp);
422
423 style.Colors[ImGuiCol_Tab] = ImColorLerp(style.Colors[ImGuiCol_WindowBg],style.Colors[ImGuiCol_TabHovered], tabsLerps.x);
424 style.Colors[ImGuiCol_TabActive] = ImColorLerp(style.Colors[ImGuiCol_TitleBgActive],style.Colors[ImGuiCol_TabHovered], tabsLerps.y);
425
426 style.Colors[ImGuiCol_TabUnfocused] = ImColorLerp(style.Colors[ImGuiCol_WindowBg],style.Colors[ImGuiCol_Tab],unfocusedTabsLerp.x);
427 style.Colors[ImGuiCol_TabUnfocusedActive] = ImColorLerp(style.Colors[ImGuiCol_WindowBg],style.Colors[ImGuiCol_TabActive],unfocusedTabsLerp.y);
428}
429
430bool SelectStyleCombo(const char* label, int* selectedIndex, int maxNumItemsToDisplay, ImGuiStyle* styleToChange) {
431 bool changed = false;
432 if (!styleToChange) styleToChange=&ImGui::GetStyle();
433 if ((changed=ImGui::Combo(label,selectedIndex,GetDefaultStyleNames(),ImGuiStyle_Count,maxNumItemsToDisplay))) {
434 ResetStyle(*selectedIndex,*styleToChange);
435 }
436 return changed;
437}
438
439bool ResetStyle(int styleEnum,ImGuiStyle& style) {
440 if (styleEnum<0 || styleEnum>=ImGuiStyle_Count) return false;
441 style = ImGuiStyle();
442 switch (styleEnum) {
444 ImGui::StyleColorsClassic(&style);
445 break;
447 ImGui::StyleColorsDark(&style);
448 break;
450 ImGui::StyleColorsLight(&style);
451 break;
452 case ImGuiStyle_Gray:
453 {
454 style.AntiAliasedLines = true;
455 style.AntiAliasedFill = true;
456 style.CurveTessellationTol = 1.25f;
457 style.Alpha = 1.f;
458 //style.WindowFillAlphaDefault = .7f;
459
460 style.WindowPadding = ImVec2(8,8);
461 style.WindowRounding = 6;
462 style.ChildRounding = 0;
463 style.FramePadding = ImVec2(3,3);
464 style.FrameRounding = 2;
465 style.ItemSpacing = ImVec2(8,4);
466 style.ItemInnerSpacing = ImVec2(5,5);
467 style.TouchExtraPadding = ImVec2(0,0);
468 style.IndentSpacing = 22;
469 style.ScrollbarSize = 16;
470 style.ScrollbarRounding = 4;
471 style.GrabMinSize = 8;
472 style.GrabRounding = 0;
473 style.WindowBorderSize = style.FrameBorderSize = 1.f;
474
475 style.Colors[ImGuiCol_Text] = ImVec4(0.82f, 0.82f, 0.82f, 1.00f);
476 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
477 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.16f, 0.16f, 0.18f, 0.70f);
478 style.Colors[ImGuiCol_ChildBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
479 style.Colors[ImGuiCol_Border] = ImVec4(0.00f, 0.00f, 0.00f, 0.60f);
480 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.33f, 0.29f, 0.33f, 0.60f);
481 style.Colors[ImGuiCol_FrameBg] = ImVec4(0.80f, 0.80f, 0.39f, 0.26f);
482 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.90f, 0.80f, 0.80f, 0.40f);
483 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.90f, 0.65f, 0.65f, 0.45f);
484 style.Colors[ImGuiCol_TitleBg] = ImGui::ConvertTitleBgColFromPrevVersion(style.Colors[ImGuiCol_WindowBg],ImVec4(0.26f, 0.27f, 0.74f, 1.00f));
485 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.28f, 0.28f, 0.76f, 0.16f);
486 style.Colors[ImGuiCol_TitleBgActive] = ImGui::ConvertTitleBgColFromPrevVersion(style.Colors[ImGuiCol_WindowBg],ImVec4(0.50f, 0.50f, 1.00f, 0.55f));
487 style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.40f, 0.40f, 0.55f, 0.80f);
488 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(1.00f, 1.00f, 1.00f, 0.18f);
489 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.67f, 0.58f, 0.00f, 1.00f);
490 style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.83f, 0.88f, 0.25f, 1.00f);
491 style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(1.00f, 1.00f, 0.67f, 1.00f);
492 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.05f, 0.05f, 0.10f, 0.90f);
493 //style.Colors[ImGuiCol_ComboBg] = ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
494 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.90f, 0.90f, 0.90f, 0.50f);
495 style.Colors[ImGuiCol_SliderGrab] = ImVec4(1.00f, 1.00f, 1.00f, 0.29f);
496 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.80f, 0.50f, 0.50f, 1.00f);
497 style.Colors[ImGuiCol_Button] = ImVec4(0.25f, 0.29f, 0.61f, 1.00f);
498 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.35f, 0.40f, 0.68f, 1.00f);
499 style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.50f, 0.52f, 0.81f, 1.00f);
500 style.Colors[ImGuiCol_Header] = ImVec4(0.11f, 0.37f, 0.00f, 1.00f);
501 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.40f, 0.50f, 0.25f, 1.00f);
502 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.51f, 0.63f, 0.27f, 1.00f);
503 style.Colors[ImGuiCol_Separator] = ImVec4(1.00f, 1.00f, 1.00f, 0.45f);
504 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.60f, 0.40f, 0.40f, 1.00f);
505 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.80f, 0.50f, 0.50f, 1.00f);
506 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(1.00f, 0.33f, 0.38f, 0.37f);
507 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(1.00f, 0.73f, 0.69f, 0.41f);
508 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(1.00f, 1.00f, 0.75f, 0.90f);
509 /*style.Colors[ImGuiCol_CloseButton] = ImVec4(0.73f, 0.20f, 0.00f, 0.68f);
510 style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(1.00f, 0.27f, 0.27f, 0.50f);
511 style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.38f, 0.23f, 0.12f, 0.50f);*/
512 style.Colors[ImGuiCol_PlotLines] = ImVec4(0.73f, 0.68f, 0.65f, 1.00f);
513 style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
514 style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
515 style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
516 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.00f, 0.00f, 0.66f, 0.34f);
517 style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
518
519 style.TabBorderSize = 0;
520 style.TabRounding = (int)(style.WindowRounding+style.ChildRounding)/2;
521 CreateDefaultTabColorsFor(style,ImGuiCol_Header,0.5f,ImVec2(0.4f,0.8f),ImVec2(0.2f,0.6f));
522 }
523 break;
524 case ImGuiStyle_Light:
525 {
526 style.AntiAliasedLines = true;
527 style.AntiAliasedFill = true;
528 style.CurveTessellationTol = 1.25f;
529 style.Alpha = 1.f;
530 //style.WindowFillAlphaDefault = .7f;
531
532 style.WindowPadding = ImVec2(8,8);
533 style.WindowRounding = 6;
534 style.ChildRounding = 0;
535 style.FramePadding = ImVec2(4,3);
536 style.FrameRounding = 0;
537 style.ItemSpacing = ImVec2(8,4);
538 style.ItemInnerSpacing = ImVec2(4,4);
539 style.TouchExtraPadding = ImVec2(0,0);
540 style.IndentSpacing = 21;
541 style.ScrollbarSize = 16;
542 style.ScrollbarRounding = 4;
543 style.GrabMinSize = 8;
544 style.GrabRounding = 0;
545 style.WindowBorderSize = style.FrameBorderSize = 1.f;
546
547 style.Colors[ImGuiCol_Text] = ImVec4(0.00f, 0.00f, 0.00f, 1.00f);
548 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.00f, 0.00f, 0.00f, 0.71f);
549 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.56f, 0.56f, 0.56f, 1.00f);
550 style.Colors[ImGuiCol_ChildBg] = ImVec4(0.99f, 1.00f, 0.71f, 0.10f);
551 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.51f, 0.63f, 0.63f, 0.92f);
552 style.Colors[ImGuiCol_Border] = ImVec4(0.14f, 0.14f, 0.14f, 0.51f);
553 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.86f, 0.86f, 0.86f, 0.51f);
554 style.Colors[ImGuiCol_FrameBg] = ImVec4(0.54f, 0.67f, 0.67f, 1.00f);
555 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.61f, 0.74f, 0.75f, 1.00f);
556 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.67f, 0.82f, 0.82f, 1.00f);
557 style.Colors[ImGuiCol_TitleBg] = ImVec4(0.54f, 0.54f, 0.24f, 1.00f);
558 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.54f, 0.54f, 0.24f, 0.39f);
559 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.68f, 0.69f, 0.30f, 1.00f);
560 style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.50f, 0.57f, 0.73f, 0.92f);
561 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.26f, 0.29f, 0.31f, 1.00f);
562 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.61f, 0.60f, 0.26f, 1.00f);
563 style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.73f, 0.72f, 0.31f, 1.00f);
564 style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.82f, 0.82f, 0.35f, 1.00f);
565 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.85f, 0.86f, 0.00f, 1.00f);
566 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.81f, 0.82f, 0.00f, 1.00f);
567 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.87f, 0.88f, 0.00f, 1.00f);
568 style.Colors[ImGuiCol_Button] = ImVec4(0.41f, 0.59f, 0.31f, 1.00f);
569 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.45f, 0.65f, 0.34f, 1.00f);
570 style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.50f, 0.73f, 0.38f, 1.00f);
571 style.Colors[ImGuiCol_Header] = ImVec4(0.42f, 0.47f, 0.88f, 1.00f);
572 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.44f, 0.51f, 0.93f, 1.00f);
573 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.50f, 0.62f, 1.00f, 1.00f);
574 style.Colors[ImGuiCol_Separator] = ImVec4(0.13f, 0.14f, 0.11f, 1.00f);
575 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.73f, 0.75f, 0.61f, 1.00f);
576 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.89f, 0.90f, 0.70f, 1.00f);
577 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.61f, 0.22f, 0.22f, 1.00f);
578 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.69f, 0.24f, 0.24f, 1.00f);
579 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.80f, 0.28f, 0.28f, 1.00f);
580 /*style.Colors[ImGuiCol_CloseButton] = ImVec4(0.67f, 0.00f, 0.00f, 0.50f);
581 style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.78f, 0.00f, 0.00f, 0.60f);
582 style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.92f, 0.00f, 0.00f, 1.00f);*/
583 style.Colors[ImGuiCol_PlotLines] = ImVec4(0.17f, 0.35f, 0.03f, 1.00f);
584 style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.41f, 0.81f, 0.06f, 1.00f);
585 style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.81f, 0.00f, 0.00f, 1.00f);
586 style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.00f, 0.00f, 1.00f);
587 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.48f, 0.61f, 0.98f, 1.00f);
588 style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.39f, 0.12f, 0.12f, 0.20f);
589
590 style.TabBorderSize = 0;
591 style.TabRounding = (int)(style.WindowRounding+style.ChildRounding)/2;
592 CreateDefaultTabColorsFor(style,ImGuiCol_TitleBg,0.9f,ImVec2(0.25f,0.8f),ImVec2(0.15f,0.6f));
593 }
594 break;
597 style.AntiAliasedLines = true;
598 style.AntiAliasedFill = true;
599 style.CurveTessellationTol = 1.25f;
600 style.Alpha = 1.f;
601 //style.WindowFillAlphaDefault = .7f;
602
603 style.WindowPadding = ImVec2(8,8);
604 style.WindowRounding = 4;
605 style.ChildRounding = 0;
606 style.FramePadding = ImVec2(3,3);
607 style.FrameRounding = 0;
608 style.ItemSpacing = ImVec2(8,4);
609 style.ItemInnerSpacing = ImVec2(5,5);
610 style.TouchExtraPadding = ImVec2(0,0);
611 style.IndentSpacing = 22;
612 style.ScrollbarSize = 16;
613 style.ScrollbarRounding = 8;
614 style.GrabMinSize = 8;
615 style.GrabRounding = 0;
616
617 ImGuiStyle& style = ImGui::GetStyle();
618 style.Colors[ImGuiCol_Text] = ImVec4(0.73f, 0.73f, 0.73f, 1.00f);
619 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.73f, 0.73f, 0.73f, 0.39f);
620 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.18f, 0.18f, 0.18f, 1.00f);
621 style.Colors[ImGuiCol_ChildBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
622 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.01f, 0.04f, 0.00f, 1.00f);
623 //style.Colors[ImGuiCol_ComboBg] = ImVec4(0.10f, 0.10f, 0.10f, 1.00f);
624 style.Colors[ImGuiCol_Border] = ImVec4(0.04f, 0.04f, 0.04f, 0.51f);
625 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.18f, 0.18f, 0.18f, 1.00f);
626 style.Colors[ImGuiCol_FrameBg] = ImVec4(0.33f, 0.33f, 0.33f, 1.00f);
627 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.39f, 0.39f, 0.40f, 1.00f);
628 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.54f, 0.54f, 0.55f, 1.00f);
629 style.Colors[ImGuiCol_TitleBg] = ImVec4(0.25f, 0.25f, 0.24f, 1.00f);
630 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.25f, 0.25f, 0.24f, 0.23f);
631 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.35f, 0.35f, 0.34f, 1.00f);
632 style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.38f, 0.38f, 0.45f, 1.00f);
633 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.24f, 0.27f, 0.30f, 0.60f);
634 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.64f, 0.64f, 0.80f, 0.59f);
635 style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.64f, 0.64f, 0.80f, 0.78f);
636 style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.64f, 0.64f, 0.80f, 1.00f);
637 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.69f, 0.69f, 0.69f, 1.00f);
638 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.69f, 0.69f, 0.69f, 1.00f);
639 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.88f, 0.88f, 0.88f, 1.00f);
640 style.Colors[ImGuiCol_Button] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
641 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.33f, 0.33f, 0.33f, 1.00f);
642 style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.45f, 0.45f, 0.45f, 1.00f);
643 style.Colors[ImGuiCol_Header] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
644 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.35f, 0.35f, 0.35f, 1.00f);
645 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.42f, 0.42f, 0.43f, 1.00f);
646 style.Colors[ImGuiCol_Separator] = ImVec4(0.84f, 0.84f, 0.84f, 0.90f);
647 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.90f, 0.90f, 0.90f, 0.95f);
648 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
649 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(1.00f, 1.00f, 1.00f, 0.30f);
650 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(1.00f, 1.00f, 1.00f, 0.60f);
651 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(1.00f, 1.00f, 1.00f, 0.90f);
652 /*style.Colors[ImGuiCol_CloseButton] = ImVec4(0.70f, 0.72f, 0.71f, 1.00f);
653 style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.83f, 0.86f, 0.84f, 1.00f);
654 style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.70f, 0.70f, 0.70f, 1.00f);*/
655 style.Colors[ImGuiCol_PlotLines] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
656 style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.90f, 0.78f, 0.37f, 1.00f);
657 style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.78f, 0.37f, 1.00f);
658 style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.77f, 0.41f, 1.00f);
659 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.26f, 0.63f, 1.00f);
660 style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
661
662 if (styleEnum == ImGuiStyle_DarkOpaqueInverse) {
663 InvertStyleColors(style);
664 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.99f, 0.96f, 1.00f, 1.00f);
665 }
666
667 style.TabBorderSize = 0;
668 style.TabRounding = (int)(style.WindowRounding+style.ChildRounding)/2;
670 }
671 break;
672 case ImGuiStyle_Soft: {
673 // style by olekristensen [https://github.com/ocornut/imgui/issues/539]
674 /* olekristensen used it wth these fonts:
675 io.Fonts->Clear();
676 io.Fonts->AddFontFromFileTTF(ofToDataPath("fonts/OpenSans-Light.ttf", true).c_str(), 16);
677 io.Fonts->AddFontFromFileTTF(ofToDataPath("fonts/OpenSans-Regular.ttf", true).c_str(), 16);
678 io.Fonts->AddFontFromFileTTF(ofToDataPath("fonts/OpenSans-Light.ttf", true).c_str(), 32);
679 io.Fonts->AddFontFromFileTTF(ofToDataPath("fonts/OpenSans-Regular.ttf", true).c_str(), 11);
680 io.Fonts->AddFontFromFileTTF(ofToDataPath("fonts/OpenSans-Bold.ttf", true).c_str(), 11);
681 io.Fonts->Build();*/
682
683 style.WindowPadding = ImVec2(15, 15);
684 style.WindowRounding = 5.0f;
685 style.FramePadding = ImVec2(5, 5);
686 style.FrameRounding = 4.0f;
687 style.ItemSpacing = ImVec2(12, 8);
688 style.ItemInnerSpacing = ImVec2(8, 6);
689 style.IndentSpacing = 25.0f;
690 style.ScrollbarSize = 15.0f;
691 style.ScrollbarRounding = 9.0f;
692 style.GrabMinSize = 5.0f;
693 style.GrabRounding = 3.0f;
694
695 style.Colors[ImGuiCol_Text] = ImVec4(0.40f, 0.39f, 0.38f, 1.00f);
696 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.40f, 0.39f, 0.38f, 0.77f);
697 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.92f, 0.91f, 0.88f, 0.70f);
698 style.Colors[ImGuiCol_ChildBg] = ImVec4(1.00f, 0.98f, 0.95f, 0.58f);
699 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.92f, 0.91f, 0.88f, 0.92f);
700 //style.Colors[ImGuiCol_ComboBg] = ImVec4(1.00f, 0.98f, 0.95f, 1.00f);
701 style.Colors[ImGuiCol_Border] = ImVec4(0.84f, 0.83f, 0.80f, 0.65f);
702 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.92f, 0.91f, 0.88f, 0.00f);
703 style.Colors[ImGuiCol_FrameBg] = ImVec4(1.00f, 0.98f, 0.95f, 1.00f);
704 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.99f, 1.00f, 0.40f, 0.78f);
705 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.26f, 1.00f, 0.00f, 1.00f);
706 style.Colors[ImGuiCol_TitleBg] = ImVec4(1.00f, 0.98f, 0.95f, 1.00f);
707 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 0.98f, 0.95f, 0.75f);
708 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
709 style.Colors[ImGuiCol_MenuBarBg] = ImVec4(1.00f, 0.98f, 0.95f, 0.47f);
710 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(1.00f, 0.98f, 0.95f, 1.00f);
711 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.00f, 0.00f, 0.00f, 0.21f);
712 style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.90f, 0.91f, 0.00f, 0.78f);
713 style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
714 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.25f, 1.00f, 0.00f, 0.80f);
715 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.00f, 0.00f, 0.00f, 0.14f);
716 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
717 style.Colors[ImGuiCol_Button] = ImVec4(0.00f, 0.00f, 0.00f, 0.14f);
718 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.99f, 1.00f, 0.22f, 0.86f);
719 style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
720 style.Colors[ImGuiCol_Header] = ImVec4(0.25f, 1.00f, 0.00f, 0.76f);
721 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.25f, 1.00f, 0.00f, 0.86f);
722 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
723 style.Colors[ImGuiCol_Separator] = ImVec4(0.00f, 0.00f, 0.00f, 0.32f);
724 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.25f, 1.00f, 0.00f, 0.78f);
725 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
726 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.04f);
727 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.25f, 1.00f, 0.00f, 0.78f);
728 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
729 /*style.Colors[ImGuiCol_CloseButton] = ImVec4(0.40f, 0.39f, 0.38f, 0.16f);
730 style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.40f, 0.39f, 0.38f, 0.39f);
731 style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.40f, 0.39f, 0.38f, 1.00f);*/
732 style.Colors[ImGuiCol_PlotLines] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
733 style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
734 style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
735 style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
736 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.25f, 1.00f, 0.00f, 0.43f);
737 style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(1.00f, 0.98f, 0.95f, 0.73f);
738
739 style.TabBorderSize = 0;
740 style.TabRounding = (int)(style.WindowRounding+style.ChildRounding)/2;
742 }
743 break;
745 // style based on an image posted by edin_p in the screenshot section (part 3) of Dear ImGui Issue Section.
746 style.WindowRounding = 6.f;
747 style.ScrollbarRounding = 2.f;
748 style.WindowTitleAlign.x=0.45f;
749 style.Colors[ImGuiCol_Text] = ImVec4(0.98f, 0.98f, 0.98f, 1.00f);
750 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.98f, 0.98f, 0.98f, 0.50f);
751 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.10f, 0.10f, 0.10f, 1.00f);
752 style.Colors[ImGuiCol_ChildBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
753 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.10f, 0.10f, 0.10f, 0.90f);
754 //style.Colors[ImGuiCol_ComboBg] = ImVec4(0.21f, 0.21f, 0.21f, 0.99f);
755 style.Colors[ImGuiCol_Border] = ImVec4(0.27f, 0.27f, 0.27f, 1.00f);
756 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 1.00f);
757 style.Colors[ImGuiCol_FrameBg] = ImVec4(0.23f, 0.23f, 0.23f, 1.00f);
758 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.28f, 0.28f, 0.28f, 0.40f);
759 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.31f, 0.31f, 0.31f, 0.45f);
760 style.Colors[ImGuiCol_TitleBg] = ImVec4(0.19f, 0.19f, 0.19f, 1.00f);
761 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.19f, 0.19f, 0.19f, 0.20f);
762 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.30f, 0.30f, 0.30f, 0.87f);
763 style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.10f, 0.10f, 0.10f, 1.00f);
764 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.30f, 0.30f, 0.30f, 0.60f);
765 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.80f, 0.80f, 0.80f, 0.30f);
766 style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.80f, 0.80f, 0.80f, 0.40f);
767 style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.86f, 0.86f, 0.86f, 0.52f);
768 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.47f, 0.47f, 0.47f, 1.00f);
769 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.60f, 0.60f, 0.60f, 0.34f);
770 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.84f, 0.84f, 0.84f, 0.34f);
771 style.Colors[ImGuiCol_Button] = ImVec4(0.29f, 0.29f, 0.29f, 1.00f);
772 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.33f, 0.33f, 0.33f, 1.00f);
773 style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.42f, 0.42f, 0.42f, 1.00f);
774 style.Colors[ImGuiCol_Header] = ImVec4(0.34f, 0.34f, 0.34f, 1.00f);
775 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.42f, 0.42f, 0.42f, 1.00f);
776 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
777 style.Colors[ImGuiCol_Separator] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
778 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.70f, 0.60f, 0.60f, 1.00f);
779 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.90f, 0.70f, 0.70f, 1.00f);
780 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(1.00f, 1.00f, 1.00f, 0.30f);
781 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(1.00f, 1.00f, 1.00f, 0.60f);
782 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(1.00f, 1.00f, 1.00f, 0.90f);
783 /*style.Colors[ImGuiCol_CloseButton] = ImVec4(1.00f, 1.00f, 1.00f, 0.50f);
784 style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.90f, 0.90f, 0.90f, 0.60f);
785 style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.70f, 0.70f, 0.70f, 1.00f);*/
786 style.Colors[ImGuiCol_PlotLines] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
787 style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
788 style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
789 style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
790 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.27f, 0.36f, 0.59f, 0.61f);
791 style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
792
793 style.TabBorderSize = 0;
794 style.TabRounding = (int)(style.WindowRounding+style.ChildRounding)/2;
796 }
797 break;
799 // style based on an image posted by edin_p in the screenshot section (part 3) of Dear ImGui Issue Section.
800 style.WindowRounding = 6.f;
801 style.ScrollbarRounding = 2.f;
802 style.WindowTitleAlign.x=0.45f;
803 style.Colors[ImGuiCol_Text] = ImVec4(0.00f, 0.00f, 0.00f, 1.00f);
804 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.00f, 0.00f, 0.00f, 0.50f);
805 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.92f, 0.92f, 0.92f, 1.00f);
806 style.Colors[ImGuiCol_ChildBg] = ImVec4(1.00f, 1.00f, 1.00f, 0.00f);
807 style.Colors[ImGuiCol_PopupBg] = ImVec4(1.00f, 1.00f, 1.00f, 0.92f);
808 //style.Colors[ImGuiCol_ComboBg] = ImVec4(0.96f, 0.96f, 0.96f, 0.92f);
809 style.Colors[ImGuiCol_Border] = ImVec4(0.73f, 0.73f, 0.73f, 0.65f);
810 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.65f, 0.65f, 0.65f, 0.31f);
811 style.Colors[ImGuiCol_FrameBg] = ImVec4(0.96f, 0.96f, 0.96f, 1.00f);
812 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.98f, 0.98f, 0.98f, 0.88f);
813 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
814 style.Colors[ImGuiCol_TitleBg] = ImVec4(0.94f, 0.94f, 0.94f, 1.00f);
815 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.94f, 0.94f, 0.94f, 0.20f);
816 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
817 style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.95f, 0.95f, 0.95f, 0.92f);
818 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.96f, 0.96f, 0.96f, 1.00f);
819 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.75f, 0.75f, 0.75f, 1.00f);
820 style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.67f, 0.67f, 0.67f, 1.00f);
821 style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.55f, 0.55f, 0.55f, 1.00f);
822 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.72f, 0.72f, 0.72f, 1.00f);
823 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.57f, 0.57f, 0.57f, 0.34f);
824 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.24f, 0.24f, 0.24f, 0.34f);
825 style.Colors[ImGuiCol_Button] = ImVec4(0.97f, 0.97f, 0.97f, 1.00f);
826 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.93f, 0.93f, 0.93f, 1.00f);
827 style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.84f, 0.84f, 0.84f, 1.00f);
828 style.Colors[ImGuiCol_Header] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
829 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.92f, 0.92f, 0.92f, 1.00f);
830 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.84f, 0.84f, 0.84f, 1.00f);
831 style.Colors[ImGuiCol_Separator] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
832 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.70f, 0.60f, 0.60f, 1.00f);
833 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.90f, 0.70f, 0.70f, 1.00f);
834 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.30f);
835 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.00f, 0.00f, 0.00f, 0.37f);
836 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.00f, 0.00f, 0.00f, 0.47f);
837 /*style.Colors[ImGuiCol_CloseButton] = ImVec4(0.00f, 0.00f, 0.00f, 0.18f);
838 style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.10f, 0.10f, 0.10f, 0.12f);
839 style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.30f, 0.30f, 0.30f, 0.08f);*/
840 style.Colors[ImGuiCol_PlotLines] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
841 style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.69f, 0.56f, 0.12f, 1.00f);
842 style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.64f, 0.50f, 0.00f, 1.00f);
843 style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.37f, 0.22f, 0.00f, 1.00f);
844 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.46f, 0.61f, 1.00f, 0.61f);
845 style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
846
847
848 style.TabBorderSize = 0;
849 style.TabRounding = (int)(style.WindowRounding+style.ChildRounding)/2;
850 CreateDefaultTabColorsFor(style,ImGuiCol_Header,0.f,ImVec2(0.0f,1.f),ImVec2(0.0f,0.6f));
851
852 }
853 break;
854 case ImGuiStyle_Maya: {
855 // Posted by @ongamex here https://gist.github.com/ongamex/4ee36fb23d6c527939d0f4ba72144d29
856 style.ChildRounding = 3.f;
857 style.GrabRounding = 0.f;
858 style.WindowRounding = 0.f;
859 style.ScrollbarRounding = 3.f;
860 style.FrameRounding = 3.f;
861 style.WindowTitleAlign = ImVec2(0.5f,0.5f);
862 style.WindowBorderSize = style.FrameBorderSize = 1.f;
863
864 style.Colors[ImGuiCol_Text] = ImVec4(0.73f, 0.73f, 0.73f, 1.00f);
865 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
866 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.26f, 0.26f, 0.26f, 0.95f);
867 style.Colors[ImGuiCol_ChildBg] = ImVec4(0.28f, 0.28f, 0.28f, 1.00f);
868 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.26f, 0.26f, 0.26f, 1.00f);
869 //style.Colors[ImGuiCol_ComboBg] = ImVec4(0.32f, 0.32f, 0.32f, 1.00f);
870 style.Colors[ImGuiCol_Border] = ImVec4(0.26f, 0.26f, 0.26f, 1.00f);
871 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.26f, 0.26f, 0.26f, 1.00f);
872 style.Colors[ImGuiCol_FrameBg] = ImVec4(0.16f, 0.16f, 0.16f, 1.00f);
873 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.16f, 0.16f, 0.16f, 1.00f);
874 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.16f, 0.16f, 0.16f, 1.00f);
875 style.Colors[ImGuiCol_TitleBg] = ImVec4(0.36f, 0.36f, 0.36f, 1.00f);
876 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.36f, 0.36f, 0.36f, 1.00f);
877 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.36f, 0.36f, 0.36f, 1.00f);
878 style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.26f, 0.26f, 0.26f, 1.00f);
879 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.21f, 0.21f, 0.21f, 1.00f);
880 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.36f, 0.36f, 0.36f, 1.00f);
881 style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.36f, 0.36f, 0.36f, 1.00f);
882 style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.36f, 0.36f, 0.36f, 1.00f);
883 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.78f, 0.78f, 0.78f, 1.00f);
884 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.74f, 0.74f, 0.74f, 1.00f);
885 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.74f, 0.74f, 0.74f, 1.00f);
886 style.Colors[ImGuiCol_Button] = ImVec4(0.36f, 0.36f, 0.36f, 1.00f);
887 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.43f, 0.43f, 0.43f, 1.00f);
888 style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.11f, 0.11f, 0.11f, 1.00f);
889 style.Colors[ImGuiCol_Header] = ImVec4(0.36f, 0.36f, 0.36f, 1.00f);
890 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.36f, 0.36f, 0.36f, 1.00f);
891 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.36f, 0.36f, 0.36f, 1.00f);
892 style.Colors[ImGuiCol_Separator] = ImVec4(0.39f, 0.39f, 0.39f, 1.00f);
893 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
894 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
895 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.36f, 0.36f, 0.36f, 1.00f);
896 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
897 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
898 /*style.Colors[ImGuiCol_CloseButton] = ImVec4(0.59f, 0.59f, 0.59f, 1.00f);
899 style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.98f, 0.39f, 0.36f, 1.00f);
900 style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.98f, 0.39f, 0.36f, 1.00f);*/
901 style.Colors[ImGuiCol_PlotLines] = ImVec4(0.39f, 0.39f, 0.39f, 1.00f);
902 style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
903 style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
904 style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
905 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.32f, 0.52f, 0.65f, 1.00f);
906 style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.50f);
907
908 style.TabBorderSize = 0;
909 style.TabRounding = (int)(style.WindowRounding+style.ChildRounding)/2;
910 CreateDefaultTabColorsFor(style,ImGuiCol_ResizeGrip,0.7f,ImVec2(0.25f,0.8f),ImVec2(0.1f,0.6f));
911 }
912 break;
915 {
916 // Posted by @codz01 here: https://github.com/ocornut/imgui/issues/1607 (hope I can use it)
917 style.AntiAliasedLines = true;
918 style.AntiAliasedFill = true;
919 style.CurveTessellationTol = 1.25f;
920 style.Alpha = 1.f;
921 //style.WindowFillAlphaDefault = .7f;
922
923 style.FramePadding = ImVec2(4.0f,2.0f);
924 style.ItemSpacing = ImVec2(8.0f,2.0f);
925 style.WindowRounding = 2.0f;
926 style.ChildRounding = 2.0f;
927 style.FrameRounding = 0.0f;
928 style.ScrollbarRounding = 0.0f;
929 style.GrabRounding = 1.0f;
930 style.WindowBorderSize = 1.0f;
931 style.FrameBorderSize = 1.0f;
932
933 style.Colors[ImGuiCol_Text] = ImVec4(0.00f, 0.00f, 0.00f, 0.85f);
934 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
935 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.94f, 0.94f, 0.94f, 1.00f);
936 style.Colors[ImGuiCol_ChildBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
937 style.Colors[ImGuiCol_PopupBg] = ImVec4(1.00f, 1.00f, 1.00f, 0.98f);
938 style.Colors[ImGuiCol_Border] = ImVec4(0.00f, 0.00f, 0.00f, 0.44f);
939 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
940 style.Colors[ImGuiCol_FrameBg] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
941 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.64f, 0.65f, 0.66f, 0.40f);
942 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.64f, 0.65f, 0.66f, 0.40f);
943 style.Colors[ImGuiCol_TitleBg] = ImVec4(0.82f, 0.82f, 0.82f, 1.00f);
944 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.71f, 0.70f, 0.70f, 1.00f);
945 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 1.00f, 1.00f, 0.51f);
946 style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.86f, 0.86f, 0.86f, 1.00f);
947 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.98f, 0.98f, 0.98f, 0.53f);
948 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.69f, 0.69f, 0.69f, 0.80f);
949 style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.49f, 0.49f, 0.49f, 0.80f);
950 style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.49f, 0.49f, 0.49f, 1.00f);
951 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.43f, 0.43f, 0.43f, 1.00f);
952 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.63f, 0.63f, 0.63f, 0.78f);
953 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.43f, 0.44f, 0.46f, 0.78f);
954 style.Colors[ImGuiCol_Button] = ImVec4(0.61f, 0.61f, 0.62f, 0.40f);
955 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.57f, 0.57f, 0.57f, 0.52f);
956 style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.61f, 0.63f, 0.64f, 1.00f);
957 style.Colors[ImGuiCol_Header] = ImVec4(0.64f, 0.64f, 0.65f, 0.31f);
958 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.58f, 0.58f, 0.59f, 0.55f);
959 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.52f, 0.52f, 0.52f, 0.55f);
960 style.Colors[ImGuiCol_Separator] = ImVec4(0.56f, 0.56f, 0.56f, 1.00f);
961 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.17f, 0.17f, 0.17f, 0.89f);
962 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.17f, 0.17f, 0.17f, 0.89f);
963 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.80f, 0.80f, 0.80f, 0.56f);
964 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.39f, 0.39f, 0.40f, 0.67f);
965 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.39f, 0.39f, 0.40f, 0.67f);
966 style.Colors[ImGuiCol_PlotLines] = ImVec4(0.39f, 0.39f, 0.39f, 1.00f);
967 style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
968 style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.78f, 0.78f, 0.78f, 1.00f);
969 style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.56f, 0.56f, 0.56f, 1.00f);
970 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.71f, 0.72f, 0.73f, 0.57f);
971 style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
972 style.Colors[ImGuiCol_DragDropTarget] = ImVec4(0.16f, 0.16f, 0.17f, 0.95f);
973
974 if (styleEnum == ImGuiStyle_GrayCodz01Inverse) {
975 InvertStyleColors(style);
976 //style.Colors[ImGuiCol_PopupBg] = ImVec4(0.99f, 0.96f, 1.00f, 1.00f);
977 }
978
979 style.TabBorderSize = 0;
980 style.TabRounding = (int)(style.WindowRounding+style.ChildRounding)/2;
982 }
983 break;
985 // Posted by @codz01 here: https://github.com/ocornut/imgui/issues/707 (hope I can use it)
986
987 // Actually these values are taken from ImGuiStyle_GrayCodz01:
988 style.AntiAliasedLines = true;
989 style.AntiAliasedFill = true;
990 style.CurveTessellationTol = 1.25f;
991 style.Alpha = 1.f;
992 //style.WindowFillAlphaDefault = .7f;
993
994 style.FramePadding = ImVec2(4.0f,2.0f);
995 style.ItemSpacing = ImVec2(8.0f,2.0f);
996 style.WindowRounding = 2.0f;
997 style.ChildRounding = 2.0f;
998 style.FrameRounding = 0.0f;
999 style.ScrollbarRounding = 0.0f;
1000 style.GrabRounding = 1.0f;
1001 style.WindowBorderSize = 1.0f;
1002 style.FrameBorderSize = 1.0f;
1003
1004 // And these from https://github.com/ocornut/imgui/issues/707:
1005 style.WindowRounding = 5.3f;
1006 style.FrameRounding = 2.3f;
1007 style.ScrollbarRounding = 0;
1008
1009 style.Colors[ImGuiCol_Text] = ImVec4(0.90f, 0.90f, 0.90f, 0.90f);
1010 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
1011 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.09f, 0.09f, 0.15f, 1.00f);
1012 //style.Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
1013 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.05f, 0.05f, 0.10f, 0.85f);
1014 style.Colors[ImGuiCol_Border] = ImVec4(0.70f, 0.70f, 0.70f, 0.65f);
1015 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
1016 style.Colors[ImGuiCol_FrameBg] = ImVec4(0.00f, 0.00f, 0.01f, 1.00f);
1017 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.90f, 0.80f, 0.80f, 0.40f);
1018 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.90f, 0.65f, 0.65f, 0.45f);
1019 style.Colors[ImGuiCol_TitleBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.83f);
1020 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.40f, 0.40f, 0.80f, 0.20f);
1021 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.00f, 0.00f, 0.00f, 0.87f);
1022 style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.01f, 0.01f, 0.02f, 0.80f);
1023 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.20f, 0.25f, 0.30f, 0.60f);
1024 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.55f, 0.53f, 0.55f, 0.51f);
1025 style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.56f, 0.56f, 0.56f, 1.00f);
1026 style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.56f, 0.56f, 0.56f, 0.91f);
1027 //style.Colors[ImGuiCol_ComboBg] = ImVec4(0.1f, 0.1f, 0.1f, 0.99f);
1028 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.90f, 0.90f, 0.90f, 0.83f);
1029 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.70f, 0.70f, 0.70f, 0.62f);
1030 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.30f, 0.30f, 0.30f, 0.84f);
1031 style.Colors[ImGuiCol_Button] = ImVec4(0.48f, 0.72f, 0.89f, 0.49f);
1032 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.50f, 0.69f, 0.99f, 0.68f);
1033 style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.80f, 0.50f, 0.50f, 1.00f);
1034 style.Colors[ImGuiCol_Header] = ImVec4(0.30f, 0.69f, 1.00f, 0.53f);
1035 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.44f, 0.61f, 0.86f, 1.00f);
1036 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.38f, 0.62f, 0.83f, 1.00f);
1037 style.Colors[ImGuiCol_Separator] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
1038 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.70f, 0.60f, 0.60f, 1.00f);
1039 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.90f, 0.70f, 0.70f, 1.00f);
1040 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(1.00f, 1.00f, 1.00f, 0.85f);
1041 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(1.00f, 1.00f, 1.00f, 0.60f);
1042 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(1.00f, 1.00f, 1.00f, 0.90f);
1043 style.Colors[ImGuiCol_PlotLines] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
1044 style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
1045 style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
1046 style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
1047 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.00f, 0.00f, 1.00f, 0.35f);
1048 style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
1049
1050 style.TabBorderSize = 0;
1051 style.TabRounding = (int)(style.WindowRounding+style.ChildRounding)/2;
1052 CreateDefaultTabColorsFor(style,ImGuiCol_HeaderHovered,0.4f,ImVec2(0.3f,0.7f),ImVec2(0.1f,0.5f));
1053 }
1054 break;
1055 case ImGuiStyle_DarkCodz01: {
1056 // Posted by @codz01 here: https://github.com/ocornut/imgui/issues/707 (hope I can use it)
1057
1058 // Actually these values are taken from ImGuiStyle_GrayCodz01:
1059 style.AntiAliasedLines = true;
1060 style.AntiAliasedFill = true;
1061 style.CurveTessellationTol = 1.25f;
1062 style.Alpha = 1.f;
1063 //style.WindowFillAlphaDefault = .7f;
1064
1065 style.FrameBorderSize = 1.0f;
1066 style.FramePadding = ImVec2(4.0f,2.0f);
1067 style.ItemSpacing = ImVec2(8.0f,2.0f);
1068 style.WindowBorderSize = 1.0f;
1069 style.WindowRounding = 1.0f;
1070 style.ChildRounding = 1.0f;
1071 style.FrameRounding = 1.0f;
1072 style.ScrollbarRounding = 1.0f;
1073 style.GrabRounding = 1.0f;
1074
1075 style.Colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 0.95f);
1076 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
1077 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.13f, 0.12f, 0.12f, 1.00f);
1078 style.Colors[ImGuiCol_ChildBg] = ImVec4(1.00f, 1.00f, 1.00f, 0.00f);
1079 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.05f, 0.05f, 0.05f, 0.94f);
1080 style.Colors[ImGuiCol_Border] = ImVec4(0.53f, 0.53f, 0.53f, 0.46f);
1081 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
1082 style.Colors[ImGuiCol_FrameBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.85f);
1083 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.22f, 0.22f, 0.22f, 0.40f);
1084 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.16f, 0.16f, 0.16f, 0.53f);
1085 style.Colors[ImGuiCol_TitleBg] = ImVec4(0.00f, 0.00f, 0.00f, 1.00f);
1086 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.00f, 0.00f, 0.00f, 1.00f);
1087 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.00f, 0.00f, 0.00f, 0.51f);
1088 style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.12f, 0.12f, 0.12f, 1.00f);
1089 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.02f, 0.02f, 0.02f, 0.53f);
1090 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
1091 style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
1092 style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.48f, 0.48f, 0.48f, 1.00f);
1093 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.79f, 0.79f, 0.79f, 1.00f);
1094 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.48f, 0.47f, 0.47f, 0.91f);
1095 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.56f, 0.55f, 0.55f, 0.62f);
1096 style.Colors[ImGuiCol_Button] = ImVec4(0.50f, 0.50f, 0.50f, 0.63f);
1097 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.67f, 0.67f, 0.68f, 0.63f);
1098 style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.26f, 0.26f, 0.26f, 0.63f);
1099 style.Colors[ImGuiCol_Header] = ImVec4(0.54f, 0.54f, 0.54f, 0.58f);
1100 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.64f, 0.65f, 0.65f, 0.80f);
1101 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.25f, 0.25f, 0.25f, 0.80f);
1102 style.Colors[ImGuiCol_Separator] = ImVec4(0.58f, 0.58f, 0.58f, 0.50f);
1103 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.81f, 0.81f, 0.81f, 0.64f);
1104 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.81f, 0.81f, 0.81f, 0.64f);
1105 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.87f, 0.87f, 0.87f, 0.53f);
1106 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.87f, 0.87f, 0.87f, 0.74f);
1107 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.87f, 0.87f, 0.87f, 0.74f);
1108 style.Colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
1109 style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.68f, 0.68f, 0.68f, 1.00f);
1110 style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.77f, 0.33f, 1.00f);
1111 style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.87f, 0.55f, 0.08f, 1.00f);
1112 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.47f, 0.60f, 0.76f, 0.47f);
1113 style.Colors[ImGuiCol_DragDropTarget] = ImVec4(0.58f, 0.58f, 0.58f, 0.90f);
1114 style.Colors[ImGuiCol_NavHighlight] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
1115 style.Colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
1116 style.Colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
1117 style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
1118
1119 style.TabBorderSize = 1.0f;
1120 style.TabRounding = 1.0f;
1121 style.Colors[ImGuiCol_Tab] = ImVec4(0.01f, 0.01f, 0.01f, 0.86f);
1122 style.Colors[ImGuiCol_TabHovered] = ImVec4(0.29f, 0.29f, 0.29f, 1.00f);
1123 style.Colors[ImGuiCol_TabActive] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
1124 style.Colors[ImGuiCol_TabUnfocused] = ImVec4(0.02f, 0.02f, 0.02f, 1.00f);
1125 style.Colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.19f, 0.19f, 0.19f, 1.00f);
1126# ifdef IMGUI_DOCKING_BRANCH // incorrect definition... for now
1127 style.Colors[ImGuiCol_DockingPreview] = ImVec4(0.38f, 0.48f, 0.60f, 1.00f);
1128 style.Colors[ImGuiCol_DockingEmptyBg] = ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
1129# endif //IMGUI_DOCKING_BRANCH
1130
1131 }
1132 break;
1133 case ImGuiStyle_Purple:
1135 {
1136 // Posted by @fallrisk here: https://github.com/ocornut/imgui/issues/1607 (hope I can use it)
1137 style.AntiAliasedLines = true;
1138 style.AntiAliasedFill = true;
1139 style.CurveTessellationTol = 1.25f;
1140 style.Alpha = 1.f;
1141 //style.WindowFillAlphaDefault = .7f;
1142 style.FrameRounding = 3;
1143
1144 style.Colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
1145 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
1146 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.27f, 0.27f, 0.28f, 1.00f);
1147 style.Colors[ImGuiCol_ChildBg] = ImVec4(0.27f, 0.27f, 0.28f, 1.00f);
1148 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.08f, 0.08f, 0.08f, 1.00f);
1149 style.Colors[ImGuiCol_Border] = ImVec4(0.27f, 0.27f, 0.28f, 1.00f);
1150 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
1151 style.Colors[ImGuiCol_FrameBg] = ImVec4(0.18f, 0.18f, 0.19f, 1.00f);
1152 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.61f, 0.35f, 0.71f, 1.00f);
1153 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.61f, 0.35f, 0.71f, 1.00f);
1154 style.Colors[ImGuiCol_TitleBg] = ImVec4(0.27f, 0.27f, 0.28f, 1.00f);
1155 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.27f, 0.27f, 0.28f, 1.00f);
1156 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.27f, 0.27f, 0.28f, 1.00f);
1157 style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.27f, 0.27f, 0.28f, 1.00f);
1158 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.27f, 0.27f, 0.28f, 1.00f);
1159 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.13f, 0.13f, 0.13f, 1.00f);
1160 style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.36f, 0.38f, 0.39f, 1.00f);
1161 style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.36f, 0.38f, 0.39f, 1.00f);
1162 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.56f, 0.27f, 0.68f, 1.00f);
1163 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.56f, 0.27f, 0.68f, 1.00f);
1164 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.56f, 0.27f, 0.68f, 1.00f);
1165 style.Colors[ImGuiCol_Button] = ImVec4(0.36f, 0.38f, 0.39f, 1.00f);
1166 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.61f, 0.35f, 0.71f, 1.00f);
1167 style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.56f, 0.27f, 0.68f, 1.00f);
1168 style.Colors[ImGuiCol_Header] = ImVec4(0.27f, 0.27f, 0.28f, 1.00f);
1169 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.27f, 0.27f, 0.28f, 1.00f);
1170 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.27f, 0.27f, 0.28f, 1.00f);
1171 style.Colors[ImGuiCol_Separator] = ImVec4(0.43f, 0.43f, 0.50f, 0.50f);
1172 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.61f, 0.35f, 0.71f, 1.00f);
1173 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.56f, 0.27f, 0.68f, 1.00f);
1174 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.36f, 0.38f, 0.39f, 1.00f);
1175 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.61f, 0.35f, 0.71f, 1.00f);
1176 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.56f, 0.27f, 0.68f, 1.00f);
1177 style.Colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
1178 style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.60f, 0.36f, 0.76f, 0.40f);
1179 style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.61f, 0.35f, 0.71f, 1.00f);
1180 style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.56f, 0.27f, 0.68f, 1.00f);
1181 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
1182 style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
1183 style.Colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
1184 style.Colors[ImGuiCol_NavHighlight] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
1185 style.Colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
1186
1187 if (styleEnum == ImGuiStyle_PurpleInverse) {
1188 InvertStyleColors(style);
1189 //style.Colors[ImGuiCol_PopupBg] = ImVec4(0.99f, 0.96f, 1.00f, 1.00f);
1190 }
1191
1192 style.TabBorderSize = 0;
1193 style.TabRounding = (int)(style.WindowRounding+style.ChildRounding)/2;
1194 CreateDefaultTabColorsFor(style,ImGuiCol_ButtonHovered,1.f,ImVec2(0.3f,0.7f),ImVec2(0.3f,0.7f));
1195 }
1196 break;
1197 case ImGuiStyle_Cherry: {
1198 // Posted by @r-lyeh here: https://github.com/ocornut/imgui/issues/707 (hope I can use it)
1199
1200 style.WindowPadding = ImVec2(6, 4);
1201 style.WindowRounding = 0.0f;
1202 style.FramePadding = ImVec2(7, 2);
1203 style.FrameRounding = 3.0f;
1204 style.ItemSpacing = ImVec2(7, 1);
1205 style.ItemInnerSpacing = ImVec2(1, 1);
1206 style.TouchExtraPadding = ImVec2(0, 0);
1207 style.IndentSpacing = 6.0f;
1208 style.ScrollbarSize = 12.0f;
1209 style.ScrollbarRounding = 16.0f;
1210 style.GrabMinSize = 20.0f;
1211 style.GrabRounding = 2.0f;
1212
1213 style.WindowTitleAlign.x = 0.50f;
1214
1215 style.FrameBorderSize = 0.0f;
1216 style.WindowBorderSize = 1.0f;
1217
1218 // cherry colors, 3 intensities
1219# define CHERRY_HI(v) ImVec4(0.502f, 0.075f, 0.256f, v)
1220# define CHERRY_MED(v) ImVec4(0.455f, 0.198f, 0.301f, v)
1221# define CHERRY_LOW(v) ImVec4(0.232f, 0.201f, 0.271f, v)
1222 // backgrounds (@todo: complete with CHERRY_BG_MED, CHERRY_BG_LOW)
1223# define CHERRY_BG(v) ImVec4(0.200f, 0.220f, 0.270f, v)
1224 // text
1225# define CHERRY_TEXT(v) ImVec4(0.860f, 0.930f, 0.890f, v)
1226
1227 style.Colors[ImGuiCol_Text] = CHERRY_TEXT(0.78f);
1228 style.Colors[ImGuiCol_TextDisabled] = CHERRY_TEXT(0.28f);
1229 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.13f, 0.14f, 0.17f, 1.00f);
1230 style.Colors[ImGuiCol_ChildBg] = CHERRY_BG( 0.58f);
1231 style.Colors[ImGuiCol_PopupBg] = CHERRY_BG( 0.9f);
1232 style.Colors[ImGuiCol_Border] = ImVec4(0.31f, 0.31f, 1.00f, 0.00f);
1233 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
1234 style.Colors[ImGuiCol_FrameBg] = CHERRY_BG( 1.00f);
1235 style.Colors[ImGuiCol_FrameBgHovered] = CHERRY_MED( 0.78f);
1236 style.Colors[ImGuiCol_FrameBgActive] = CHERRY_MED( 1.00f);
1237 style.Colors[ImGuiCol_TitleBg] = CHERRY_LOW( 1.00f);
1238 style.Colors[ImGuiCol_TitleBgActive] = CHERRY_HI( 1.00f);
1239 style.Colors[ImGuiCol_TitleBgCollapsed] = CHERRY_BG( 0.75f);
1240 style.Colors[ImGuiCol_MenuBarBg] = CHERRY_BG( 0.47f);
1241 style.Colors[ImGuiCol_ScrollbarBg] = CHERRY_BG( 1.00f);
1242 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.09f, 0.15f, 0.16f, 1.00f);
1243 style.Colors[ImGuiCol_ScrollbarGrabHovered] = CHERRY_MED( 0.78f);
1244 style.Colors[ImGuiCol_ScrollbarGrabActive] = CHERRY_MED( 1.00f);
1245 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.71f, 0.22f, 0.27f, 1.00f);
1246 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.47f, 0.77f, 0.83f, 0.14f);
1247 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.71f, 0.22f, 0.27f, 1.00f);
1248 style.Colors[ImGuiCol_Button] = ImVec4(0.47f, 0.77f, 0.83f, 0.14f);
1249 style.Colors[ImGuiCol_ButtonHovered] = CHERRY_MED( 0.86f);
1250 style.Colors[ImGuiCol_ButtonActive] = CHERRY_MED( 1.00f);
1251 style.Colors[ImGuiCol_Header] = CHERRY_MED( 0.76f);
1252 style.Colors[ImGuiCol_HeaderHovered] = CHERRY_MED( 0.86f);
1253 style.Colors[ImGuiCol_HeaderActive] = CHERRY_HI( 1.00f);
1254 style.Colors[ImGuiCol_Separator] = ImVec4(0.14f, 0.16f, 0.19f, 1.00f);
1255 style.Colors[ImGuiCol_SeparatorHovered] = CHERRY_MED( 0.78f);
1256 style.Colors[ImGuiCol_SeparatorActive] = CHERRY_MED( 1.00f);
1257 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.47f, 0.77f, 0.83f, 0.04f);
1258 style.Colors[ImGuiCol_ResizeGripHovered] = CHERRY_MED( 0.78f);
1259 style.Colors[ImGuiCol_ResizeGripActive] = CHERRY_MED( 1.00f);
1260 style.Colors[ImGuiCol_PlotLines] = CHERRY_TEXT(0.63f);
1261 style.Colors[ImGuiCol_PlotLinesHovered] = CHERRY_MED( 1.00f);
1262 style.Colors[ImGuiCol_PlotHistogram] = CHERRY_TEXT(0.63f);
1263 style.Colors[ImGuiCol_PlotHistogramHovered] = CHERRY_MED( 1.00f);
1264 style.Colors[ImGuiCol_TextSelectedBg] = CHERRY_MED( 0.43f);
1265 // [...]
1266 style.Colors[ImGuiCol_ModalWindowDimBg] = CHERRY_BG( 0.73f);
1267 style.Colors[ImGuiCol_Border] = ImVec4(0.539f, 0.479f, 0.255f, 0.162f);
1268
1269# undef CHERRY_HI
1270# undef CHERRY_MED
1271# undef CHERRY_LOW
1272# undef CHERRY_BG
1273# undef CHERRY_TEXT
1274
1275 style.TabBorderSize = 0;
1276 style.TabRounding = (int)(style.WindowRounding+style.ChildRounding)/2;
1277 CreateDefaultTabColorsFor(style,ImGuiCol_HeaderHovered,0.65f,ImVec2(0.4f,0.6f),ImVec2(0.2f,0.4f));
1278 }
1279 break;
1282 // Posted by @ebachard here: https://github.com/ocornut/imgui/pull/1776 (hope I can use it)
1283 style.WindowRounding = 2.0f; // Radius of window corners rounding. Set to 0.0f to have rectangular windows
1284 style.ScrollbarRounding = 3.0f; // Radius of grab corners rounding for scrollbar
1285 style.GrabRounding = 2.0f; // Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
1286 style.AntiAliasedLines = true;
1287 style.AntiAliasedFill = true;
1288 style.WindowRounding = 2;
1289 style.ChildRounding = 2;
1290 style.ScrollbarSize = 16;
1291 style.ScrollbarRounding = 3;
1292 style.GrabRounding = 2;
1293 style.ItemSpacing.x = 10;
1294 style.ItemSpacing.y = 4;
1295 style.IndentSpacing = 22;
1296 style.FramePadding.x = 6;
1297 style.FramePadding.y = 4;
1298 style.Alpha = 1.0f;
1299 style.FrameRounding = 3.0f;
1300
1301 style.Colors[ImGuiCol_Text] = ImVec4(0.00f, 0.00f, 0.00f, 1.00f);
1302 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
1303 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.86f, 0.86f, 0.86f, 1.00f);
1304 //style.Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
1305 style.Colors[ImGuiCol_ChildBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
1306 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.93f, 0.93f, 0.93f, 0.98f);
1307 style.Colors[ImGuiCol_Border] = ImVec4(0.71f, 0.71f, 0.71f, 0.08f);
1308 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.04f);
1309 style.Colors[ImGuiCol_FrameBg] = ImVec4(0.71f, 0.71f, 0.71f, 0.55f);
1310 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.94f, 0.94f, 0.94f, 0.55f);
1311 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.71f, 0.78f, 0.69f, 0.98f);
1312 style.Colors[ImGuiCol_TitleBg] = ImVec4(0.85f, 0.85f, 0.85f, 1.00f);
1313 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.82f, 0.78f, 0.78f, 0.51f);
1314 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.78f, 0.78f, 0.78f, 1.00f);
1315 style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.86f, 0.86f, 0.86f, 1.00f);
1316 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.20f, 0.25f, 0.30f, 0.61f);
1317 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.90f, 0.90f, 0.90f, 0.30f);
1318 style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.92f, 0.92f, 0.92f, 0.78f);
1319 style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
1320 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.184f, 0.407f, 0.193f, 1.00f);
1321 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.26f, 0.59f, 0.98f, 0.78f);
1322 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
1323 style.Colors[ImGuiCol_Button] = ImVec4(0.71f, 0.78f, 0.69f, 0.40f);
1324 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.725f, 0.805f, 0.702f, 1.00f);
1325 style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.793f, 0.900f, 0.836f, 1.00f);
1326 style.Colors[ImGuiCol_Header] = ImVec4(0.71f, 0.78f, 0.69f, 0.31f);
1327 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.71f, 0.78f, 0.69f, 0.80f);
1328 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.71f, 0.78f, 0.69f, 1.00f);
1329 style.Colors[ImGuiCol_Separator] = ImVec4(0.39f, 0.39f, 0.39f, 1.00f);
1330 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.78f);
1331 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
1332 style.Colors[ImGuiCol_Separator] = ImVec4(0.39f, 0.39f, 0.39f, 1.00f);
1333 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.14f, 0.44f, 0.80f, 0.78f);
1334 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.14f, 0.44f, 0.80f, 1.00f);
1335 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(1.00f, 1.00f, 1.00f, 0.00f);
1336 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.45f);
1337 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.78f);
1338 style.Colors[ImGuiCol_PlotLines] = ImVec4(0.39f, 0.39f, 0.39f, 1.00f);
1339 style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
1340 style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
1341 style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
1342 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
1343 style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
1344 style.Colors[ImGuiCol_DragDropTarget] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
1345 style.Colors[ImGuiCol_NavHighlight] = style.Colors[ImGuiCol_HeaderHovered];
1346 style.Colors[ImGuiCol_NavWindowingHighlight] = ImVec4(0.70f, 0.70f, 0.70f, 0.70f);
1347
1348 if (styleEnum == ImGuiStyle_LightGreenInverse) {
1349 InvertStyleColors(style);
1350 //style.Colors[ImGuiCol_PopupBg] = ImVec4(0.99f, 0.96f, 1.00f, 1.00f);
1351 }
1352
1353 style.TabBorderSize = 0;
1354 style.TabRounding = (int)(style.WindowRounding+style.ChildRounding)/2;
1356 }
1357 break;
1358 case ImGuiStyle_Design:
1360 // Posted by @usernameiwantedwasalreadytaken here: https://github.com/ocornut/imgui/issues/707 (hope I can use it)
1361 float hspacing = 8.f;
1362 float vspacing = 6.f;
1363 style.DisplaySafeAreaPadding = ImVec2(0, 0);
1364 style.WindowPadding = ImVec2(hspacing/2, vspacing);
1365 style.FramePadding = ImVec2(hspacing, vspacing);
1366 style.ItemSpacing = ImVec2(hspacing, vspacing);
1367 style.ItemInnerSpacing = ImVec2(hspacing, vspacing);
1368 style.IndentSpacing = 20.0f;
1369
1370 style.WindowRounding = 0.0f;
1371 style.FrameRounding = 0.0f;
1372
1373 style.WindowBorderSize = 0.0f;
1374 style.FrameBorderSize = 1.0f;
1375 style.PopupBorderSize = 1.0f;
1376
1377 style.ScrollbarSize = 20.0f;
1378 style.ScrollbarRounding = 0.0f;
1379 style.GrabMinSize = 5.0f;
1380 style.GrabRounding = 0.0f;
1381
1382 ImVec4 white = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
1383 ImVec4 transparent = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
1384 ImVec4 dark = ImVec4(0.00f, 0.00f, 0.00f, 0.20f);
1385 ImVec4 darker = ImVec4(0.00f, 0.00f, 0.00f, 0.50f);
1386
1387 ImVec4 background = ImVec4(0.95f, 0.95f, 0.95f, 1.00f);
1388 ImVec4 text = ImVec4(0.10f, 0.10f, 0.10f, 1.00f);
1389 ImVec4 border = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
1390 ImVec4 grab = ImVec4(0.69f, 0.69f, 0.69f, 1.00f);
1391 ImVec4 header = ImVec4(0.86f, 0.86f, 0.86f, 1.00f);
1392 ImVec4 active = ImVec4(0.00f, 0.47f, 0.84f, 1.00f);
1393 ImVec4 hover = ImVec4(0.00f, 0.47f, 0.84f, 0.20f);
1394
1395 style.Colors[ImGuiCol_Text] = text;
1396 style.Colors[ImGuiCol_WindowBg] = background;
1397 style.Colors[ImGuiCol_ChildBg] = background;
1398 style.Colors[ImGuiCol_PopupBg] = white;
1399
1400 style.Colors[ImGuiCol_Border] = border;
1401 style.Colors[ImGuiCol_BorderShadow] = transparent;
1402
1403 style.Colors[ImGuiCol_Button] = header;
1404 style.Colors[ImGuiCol_ButtonHovered] = hover;
1405 style.Colors[ImGuiCol_ButtonActive] = active;
1406
1407 style.Colors[ImGuiCol_FrameBg] = white;
1408 style.Colors[ImGuiCol_FrameBgHovered] = hover;
1409 style.Colors[ImGuiCol_FrameBgActive] = active;
1410
1411 style.Colors[ImGuiCol_MenuBarBg] = header;
1412 style.Colors[ImGuiCol_Header] = header;
1413 style.Colors[ImGuiCol_HeaderHovered] = hover;
1414 style.Colors[ImGuiCol_HeaderActive] = active;
1415
1416 style.Colors[ImGuiCol_CheckMark] = text;
1417 style.Colors[ImGuiCol_SliderGrab] = grab;
1418 style.Colors[ImGuiCol_SliderGrabActive] = darker;
1419
1420 //style.Colors[ImGuiCol_CloseButton] = transparent;
1421 //style.Colors[ImGuiCol_CloseButtonHovered] = transparent;
1422 //style.Colors[ImGuiCol_CloseButtonActive] = transparent;
1423
1424 style.Colors[ImGuiCol_ScrollbarBg] = header;
1425 style.Colors[ImGuiCol_ScrollbarGrab] = grab;
1426 style.Colors[ImGuiCol_ScrollbarGrabHovered] = dark;
1427 style.Colors[ImGuiCol_ScrollbarGrabActive] = darker;
1428
1429 // These were missing:
1430 style.Colors[ImGuiCol_TitleBg] = ImVec4(0.94f, 0.94f, 0.94f, 1.00f);
1431 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.94f, 0.94f, 0.94f, 0.20f);
1432 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
1433
1434
1435 if (styleEnum == ImGuiStyle_DesignInverse) {
1436 InvertStyleColors(style);
1437 //style.Colors[ImGuiCol_PopupBg] = ImVec4(0.99f, 0.96f, 1.00f, 1.00f);
1438 }
1439 style.TabBorderSize = 0;
1440 style.TabRounding = (int)(style.WindowRounding+style.ChildRounding)/2;
1442 }
1443 break;
1444 case ImGuiStyle_Dracula: {
1445 // Posted by @ice1000 here: https://github.com/ocornut/imgui/issues/707 (hope I can use it)
1446 style.WindowRounding = 5.3f;
1447 style.GrabRounding = style.FrameRounding = 2.3f;
1448 style.ScrollbarRounding = 5.0f;
1449 style.FrameBorderSize = 1.0f;
1450 style.ItemSpacing.y = 6.5f;
1451
1452 style.Colors[ImGuiCol_Text] = ImVec4(0.73333335f, 0.73333335f, 0.73333335f, 1.00f);
1453 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.34509805f, 0.34509805f, 0.34509805f, 1.00f);
1454 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.23529413f, 0.24705884f, 0.25490198f, 0.94f);
1455 style.Colors[ImGuiCol_ChildBg] = ImVec4(0.23529413f, 0.24705884f, 0.25490198f, 0.00f);
1456 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.23529413f, 0.24705884f, 0.25490198f, 0.94f);
1457 style.Colors[ImGuiCol_Border] = ImVec4(0.33333334f, 0.33333334f, 0.33333334f, 0.50f);
1458 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.15686275f, 0.15686275f, 0.15686275f, 0.00f);
1459 style.Colors[ImGuiCol_FrameBg] = ImVec4(0.16862746f, 0.16862746f, 0.16862746f, 0.54f);
1460 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.453125f, 0.67578125f, 0.99609375f, 0.67f);
1461 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.47058827f, 0.47058827f, 0.47058827f, 0.67f);
1462 style.Colors[ImGuiCol_TitleBg] = ImVec4(0.04f, 0.04f, 0.04f, 1.00f);
1463 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.16f, 0.29f, 0.48f, 1.00f);
1464 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.00f, 0.00f, 0.00f, 0.51f);
1465 style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.27058825f, 0.28627452f, 0.2901961f, 0.80f);
1466 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.27058825f, 0.28627452f, 0.2901961f, 0.60f);
1467 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.21960786f, 0.30980393f, 0.41960788f, 0.51f);
1468 style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.21960786f, 0.30980393f, 0.41960788f, 1.00f);
1469 style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.13725491f, 0.19215688f, 0.2627451f, 0.91f);
1470 // style.Colors[ImGuiCol_ComboBg] = ImVec4(0.1f, 0.1f, 0.1f, 0.99f);
1471 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.90f, 0.90f, 0.90f, 0.83f);
1472 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.70f, 0.70f, 0.70f, 0.62f);
1473 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.30f, 0.30f, 0.30f, 0.84f);
1474 style.Colors[ImGuiCol_Button] = ImVec4(0.33333334f, 0.3529412f, 0.36078432f, 0.49f);
1475 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.21960786f, 0.30980393f, 0.41960788f, 1.00f);
1476 style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.13725491f, 0.19215688f, 0.2627451f, 1.00f);
1477 style.Colors[ImGuiCol_Header] = ImVec4(0.33333334f, 0.3529412f, 0.36078432f, 0.53f);
1478 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.21960786f, 0.30980393f, 0.41960788f, 1.00f);
1479 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.13725491f, 0.19215688f, 0.2627451f, 1.00f);
1480 style.Colors[ImGuiCol_Separator] = ImVec4(0.31640625f, 0.31640625f, 0.31640625f, 1.00f);
1481 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.31640625f, 0.31640625f, 0.31640625f, 1.00f);
1482 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.31640625f, 0.31640625f, 0.31640625f, 1.00f);
1483 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(1.00f, 1.00f, 1.00f, 0.85f);
1484 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(1.00f, 1.00f, 1.00f, 0.60f);
1485 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(1.00f, 1.00f, 1.00f, 0.90f);
1486 style.Colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
1487 style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
1488 style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
1489 style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
1490 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.18431373f, 0.39607847f, 0.79215693f, 0.90f);
1491
1492 style.TabBorderSize = 0;
1493 style.TabRounding = (int)(style.WindowRounding+style.ChildRounding)/2;
1494 CreateDefaultTabColorsFor(style,ImGuiCol_Header,1.0f,ImVec2(0.15f,1.0f),ImVec2(0.05f,0.9f));
1495 }
1496 break;
1497 case ImGuiStyle_Greenish: {
1498 // Posted by @dertseha here: https://github.com/ocornut/imgui/issues/1902 (Hope I can use it)
1499 style.Colors[ImGuiCol_Text] = ImVec4(0.13f, 1.00f, 0.26f, 1.00f);
1500 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.02f, 0.80f, 0.58f, 1.00f);
1501 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.19f, 0.00f, 0.22f, 0.80f);
1502 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.19f, 0.00f, 0.22f, 0.75f);
1503 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.32f, 0.60f, 0.35f, 1.00f);
1504 style.Colors[ImGuiCol_FrameBg] = ImVec4(0.32f, 0.60f, 0.35f, 0.54f);
1505 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.02f, 0.80f, 0.58f, 0.40f);
1506 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.02f, 0.80f, 0.58f, 0.67f);
1507 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.02f, 0.80f, 0.58f, 1.00f);
1508 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.02f, 0.80f, 0.58f, 1.00f);
1509 style.Colors[ImGuiCol_Button] = ImVec4(0.02f, 0.80f, 0.58f, 0.40f);
1510 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.02f, 0.80f, 0.58f, 1.00f);
1511 style.Colors[ImGuiCol_Header] = ImVec4(0.32f, 0.60f, 0.35f, 0.70f);
1512 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.02f, 0.80f, 0.58f, 0.80f);
1513 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.02f, 0.80f, 0.58f, 1.00f);
1514 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.02f, 0.80f, 0.58f, 0.25f);
1515 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.02f, 0.80f, 0.58f, 0.67f);
1516 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.02f, 0.80f, 0.58f, 0.95f);
1517 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.02f, 0.80f, 0.58f, 0.35f);
1518 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.77f, 0.22f, 0.62f, 1.00f);
1519 style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.77f, 0.22f, 0.62f, 1.00f);
1520 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.77f, 0.22f, 0.62f, 0.78f);
1521 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.32f, 0.60f, 0.35f, 1.00f);
1522
1523 style.TabBorderSize = 0;
1524 style.TabRounding = (int)(style.WindowRounding+style.ChildRounding)/2;
1525 CreateDefaultTabColorsFor(style,ImGuiCol_Header,0.35f);
1526 }
1527 break;
1528 case ImGuiStyle_C64: {
1529 // Posted by @Nullious here: https://gist.github.com/Nullious/2d598963b346c49fa4500ca16b8e5c67 (Hope I can use it)
1530 // Recommended fonts here: https://www.kreativekorp.com/software/fonts/c64.shtml
1531
1532 const ImVec4 black(0,0,0,1);
1533 const ImVec4 white(1,1,1,1);
1534 [[maybe_unused]] const ImVec4 red(136/255.0f,57/255.0f,50/255.0f,1.0f);
1535 const ImVec4 cyan(103/255.0f,182/255.0f,189/255.0f,1.0f);
1536 const ImVec4 purple(139/255.0f,63/255.0f,150/255.0f,1.0f);
1537 const ImVec4 green(85/255.0f,160/255.0f,73/255.0f,1.0f);
1538 const ImVec4 blue(64/255.0f,49/255.0f,141/255.0f,1.0f);
1539 const ImVec4 yellow(191/255.0f,206/255.0f,114/255.0f,1.0f);
1540 const ImVec4 orange(139/255.0f,84/255.0f,41/255.0f,1.0f);
1541 const ImVec4 brown(87/255.0f,66/255.0f,0/255.0f,1.0f);
1542 const ImVec4 pink(184/255.0f,105/255.0f,98/255.0f,1.0f);
1543 const ImVec4 dgray(80/255.0f,80/255.0f,80/255.0f,1.0f);
1544 const ImVec4 mgray(120/255.0f,120/255.0f,120/255.0f,1.0f);
1545 const ImVec4 lgreen(148/255.0f,224/255.0f,137/255.0f,1.0f);
1546 const ImVec4 lblue(120/255.0f,105/255.0f,196/255.0f,1.0f);
1547 const ImVec4 lgray(159/255.0f,159/255.0f,159/255.0f,1.0f);
1548
1549 style.FramePadding = ImVec2(8,1);
1550 style.FrameRounding = 0;
1551 style.WindowBorderSize = 0;
1552 style.WindowPadding = ImVec2(0,0);
1553 style.PopupBorderSize = 0;
1554 style.PopupRounding = 0;
1555 style.WindowRounding = 0;
1556 style.ScrollbarRounding = 0;
1557 style.TabRounding = 0;
1558 style.ItemSpacing = ImVec2(4,2);
1559 style.ItemInnerSpacing = ImVec2(0,0);
1560 style.GrabMinSize = 8;
1561 style.GrabRounding = 0;
1562
1563 style.Colors[ImGuiCol_Text] = white;
1564 style.Colors[ImGuiCol_TextDisabled] = black;
1565 style.Colors[ImGuiCol_WindowBg] = lblue;
1566 style.Colors[ImGuiCol_ChildBg] = lblue;
1567 style.Colors[ImGuiCol_PopupBg] = green;
1568 style.Colors[ImGuiCol_Border] = blue;
1569 style.Colors[ImGuiCol_BorderShadow] = black;
1570 style.Colors[ImGuiCol_FrameBg] = brown;
1571 style.Colors[ImGuiCol_FrameBgHovered] = orange;
1572 style.Colors[ImGuiCol_FrameBgActive] = pink;
1573 style.Colors[ImGuiCol_TitleBg] = dgray;
1574 style.Colors[ImGuiCol_TitleBgActive] = mgray;
1575 style.Colors[ImGuiCol_TitleBgCollapsed] = black;
1576 style.Colors[ImGuiCol_MenuBarBg] = blue;
1577 style.Colors[ImGuiCol_ScrollbarBg] = black;
1578 style.Colors[ImGuiCol_ScrollbarGrab] = lgray;
1579 style.Colors[ImGuiCol_ScrollbarGrabHovered] = green;
1580 style.Colors[ImGuiCol_ScrollbarGrabActive] = lgreen;
1581 style.Colors[ImGuiCol_CheckMark] = yellow;
1582 style.Colors[ImGuiCol_SliderGrab] = lgray;
1583 style.Colors[ImGuiCol_SliderGrabActive] = lgreen;
1584 style.Colors[ImGuiCol_Button] = blue;
1585 style.Colors[ImGuiCol_ButtonHovered] = cyan;
1586 style.Colors[ImGuiCol_ButtonActive] = lblue;
1587 style.Colors[ImGuiCol_Header] = blue;
1588 style.Colors[ImGuiCol_HeaderHovered] = cyan;
1589 style.Colors[ImGuiCol_HeaderActive] = lblue;
1590 style.Colors[ImGuiCol_Separator] = blue;
1591 style.Colors[ImGuiCol_SeparatorHovered] = blue;
1592 style.Colors[ImGuiCol_SeparatorActive] = blue;
1593 style.Colors[ImGuiCol_ResizeGrip] = white;
1594 style.Colors[ImGuiCol_ResizeGripHovered] = lgreen;
1595 style.Colors[ImGuiCol_ResizeGripActive] = green;
1596 style.Colors[ImGuiCol_PlotLines] = lgreen;
1597 style.Colors[ImGuiCol_PlotLinesHovered] = white;
1598 style.Colors[ImGuiCol_PlotHistogram] = white;
1599 style.Colors[ImGuiCol_PlotHistogramHovered] = white;
1600 style.Colors[ImGuiCol_TextSelectedBg] = black;
1601 style.Colors[ImGuiCol_ModalWindowDimBg] = black;
1602 style.Colors[ImGuiCol_DragDropTarget] = yellow;
1603 style.Colors[ImGuiCol_NavHighlight] = purple;
1604 style.Colors[ImGuiCol_NavWindowingHighlight] = pink;
1605
1606 style.Colors[ImGuiCol_TabHovered] = style.Colors[ImGuiCol_FrameBgActive];
1607 style.Colors[ImGuiCol_Tab] = style.Colors[ImGuiCol_FrameBg];
1608 style.Colors[ImGuiCol_TabActive] = style.Colors[ImGuiCol_FrameBgHovered];
1609 style.Colors[ImGuiCol_TabUnfocused] = style.Colors[ImGuiCol_TitleBg];
1610 style.Colors[ImGuiCol_TabUnfocusedActive] = style.Colors[ImGuiCol_TitleBgActive];
1611
1612 style.TabBorderSize = style.TabRounding = 0;
1613 }
1614 break;
1615 case ImGuiStyle_PhotoStore: {
1616 // Posted by @Derydoca here: https://github.com/ocornut/imgui/issues/707 (hope I can use it)
1617
1618 style.ChildRounding = 4.0f;
1619 style.FrameBorderSize = 1.0f;
1620 style.FrameRounding = 2.0f;
1621 style.GrabMinSize = 7.0f;
1622 style.PopupRounding = 2.0f;
1623 style.ScrollbarRounding = 12.0f;
1624 style.ScrollbarSize = 13.0f;
1625 style.TabBorderSize = 1.0f;
1626 style.TabRounding = 0.0f;
1627 style.WindowRounding = 4.0f;
1628
1629 style.Colors[ImGuiCol_Text] = ImVec4(1.000f, 1.000f, 1.000f, 1.000f);
1630 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.500f, 0.500f, 0.500f, 1.000f);
1631 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.180f, 0.180f, 0.180f, 1.000f);
1632 style.Colors[ImGuiCol_ChildBg] = ImVec4(0.280f, 0.280f, 0.280f, 0.000f);
1633 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.313f, 0.313f, 0.313f, 1.000f);
1634 style.Colors[ImGuiCol_Border] = ImVec4(0.266f, 0.266f, 0.266f, 1.000f);
1635 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.000f, 0.000f, 0.000f, 0.000f);
1636 style.Colors[ImGuiCol_FrameBg] = ImVec4(0.160f, 0.160f, 0.160f, 1.000f);
1637 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.200f, 0.200f, 0.200f, 1.000f);
1638 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.280f, 0.280f, 0.280f, 1.000f);
1639 style.Colors[ImGuiCol_TitleBg] = ImVec4(0.148f, 0.148f, 0.148f, 1.000f);
1640 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.148f, 0.148f, 0.148f, 1.000f);
1641 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.148f, 0.148f, 0.148f, 1.000f);
1642 style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.195f, 0.195f, 0.195f, 1.000f);
1643 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.160f, 0.160f, 0.160f, 1.000f);
1644 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.277f, 0.277f, 0.277f, 1.000f);
1645 style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.300f, 0.300f, 0.300f, 1.000f);
1646 style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
1647 style.Colors[ImGuiCol_CheckMark] = ImVec4(1.000f, 1.000f, 1.000f, 1.000f);
1648 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.391f, 0.391f, 0.391f, 1.000f);
1649 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
1650 style.Colors[ImGuiCol_Button] = ImVec4(1.000f, 1.000f, 1.000f, 0.000f);
1651 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(1.000f, 1.000f, 1.000f, 0.156f);
1652 style.Colors[ImGuiCol_ButtonActive] = ImVec4(1.000f, 1.000f, 1.000f, 0.391f);
1653 style.Colors[ImGuiCol_Header] = ImVec4(0.313f, 0.313f, 0.313f, 1.000f);
1654 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.469f, 0.469f, 0.469f, 1.000f);
1655 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.469f, 0.469f, 0.469f, 1.000f);
1656 style.Colors[ImGuiCol_Separator] = style.Colors[ImGuiCol_Border];
1657 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.391f, 0.391f, 0.391f, 1.000f);
1658 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
1659 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(1.000f, 1.000f, 1.000f, 0.250f);
1660 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(1.000f, 1.000f, 1.000f, 0.670f);
1661 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
1662 style.Colors[ImGuiCol_Tab] = ImVec4(0.098f, 0.098f, 0.098f, 1.000f);
1663 style.Colors[ImGuiCol_TabHovered] = ImVec4(0.352f, 0.352f, 0.352f, 1.000f);
1664 style.Colors[ImGuiCol_TabActive] = ImVec4(0.195f, 0.195f, 0.195f, 1.000f);
1665 style.Colors[ImGuiCol_TabUnfocused] = ImVec4(0.098f, 0.098f, 0.098f, 1.000f);
1666 style.Colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.195f, 0.195f, 0.195f, 1.000f);
1667 style.Colors[ImGuiCol_PlotLines] = ImVec4(0.469f, 0.469f, 0.469f, 1.000f);
1668 style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
1669 style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.586f, 0.586f, 0.586f, 1.000f);
1670 style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
1671 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(1.000f, 1.000f, 1.000f, 0.156f);
1672 style.Colors[ImGuiCol_DragDropTarget] = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
1673 style.Colors[ImGuiCol_NavHighlight] = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
1674 style.Colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.000f, 0.391f, 0.000f, 1.000f);
1675 style.Colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.000f, 0.000f, 0.000f, 0.586f);
1676 style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.000f, 0.000f, 0.000f, 0.586f);
1677
1678 // I guess these two are only available in the Docking Branch
1679 //style.Colors[ImGuiCol_DockingPreview] = ImVec4(1.000f, 0.391f, 0.000f, 0.781f);
1680 //style.Colors[ImGuiCol_DockingEmptyBg] = ImVec4(0.180f, 0.180f, 0.180f, 1.000f);
1681
1682 }
1683 break;
1686 // Posted by @malamanteau here: https://github.com/ocornut/imgui/issues/707 (hope I can use it)
1688 const int is3D = (styleEnum==ImGuiStyle_CorporateGreyFramed)?1:0;
1689
1690 style.PopupRounding = 3;
1691 style.WindowPadding = ImVec2(4, 4);
1692 style.FramePadding = ImVec2(6, 4);
1693 style.ItemSpacing = ImVec2(6, 2);
1694 style.ScrollbarSize = 18;
1695 style.WindowBorderSize = 1;
1696 style.ChildBorderSize = 1;
1697 style.PopupBorderSize = 1;
1698 style.FrameBorderSize = is3D;
1699 style.WindowRounding = 3;
1700 style.ChildRounding = 3;
1701 style.FrameRounding = 3;
1702 style.ScrollbarRounding = 2;
1703 style.GrabRounding = 3;
1704 style.TabBorderSize = is3D;
1705 style.TabRounding = 3;
1706
1707 style.Colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
1708 style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.40f, 0.40f, 0.40f, 1.00f);
1709 style.Colors[ImGuiCol_ChildBg] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
1710 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
1711 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
1712 style.Colors[ImGuiCol_Border] = ImVec4(0.12f, 0.12f, 0.12f, 0.71f);
1713 style.Colors[ImGuiCol_BorderShadow] = ImVec4(1.00f, 1.00f, 1.00f, 0.06f);
1714 style.Colors[ImGuiCol_FrameBg] = ImVec4(0.42f, 0.42f, 0.42f, 0.54f);
1715 style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.42f, 0.42f, 0.42f, 0.40f);
1716 style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.56f, 0.56f, 0.56f, 0.67f);
1717 style.Colors[ImGuiCol_TitleBg] = ImVec4(0.19f, 0.19f, 0.19f, 1.00f);
1718 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.22f, 0.22f, 0.22f, 1.00f);
1719 style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.17f, 0.17f, 0.17f, 0.90f);
1720 style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.335f, 0.335f, 0.335f, 1.000f);
1721 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.24f, 0.24f, 0.24f, 0.53f);
1722 style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
1723 style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.52f, 0.52f, 0.52f, 1.00f);
1724 style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.76f, 0.76f, 0.76f, 1.00f);
1725 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.65f, 0.65f, 0.65f, 1.00f);
1726 style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.52f, 0.52f, 0.52f, 1.00f);
1727 style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.64f, 0.64f, 0.64f, 1.00f);
1728 style.Colors[ImGuiCol_Button] = ImVec4(0.54f, 0.54f, 0.54f, 0.35f);
1729 style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.52f, 0.52f, 0.52f, 0.59f);
1730 style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.76f, 0.76f, 0.76f, 1.00f);
1731 style.Colors[ImGuiCol_Header] = ImVec4(0.38f, 0.38f, 0.38f, 1.00f);
1732 style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.47f, 0.47f, 0.47f, 1.00f);
1733 style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.76f, 0.76f, 0.76f, 0.77f);
1734 style.Colors[ImGuiCol_Separator] = ImVec4(0.000f, 0.000f, 0.000f, 0.137f);
1735 style.Colors[ImGuiCol_SeparatorHovered] = ImVec4(0.700f, 0.671f, 0.600f, 0.290f);
1736 style.Colors[ImGuiCol_SeparatorActive] = ImVec4(0.702f, 0.671f, 0.600f, 0.674f);
1737 style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.26f, 0.59f, 0.98f, 0.25f);
1738 style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f);
1739 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
1740 style.Colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
1741 style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
1742 style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
1743 style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
1744 style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.73f, 0.73f, 0.73f, 0.35f);
1745 style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
1746 style.Colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
1747 style.Colors[ImGuiCol_NavHighlight] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
1748 style.Colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
1749 style.Colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
1750
1751 style.Colors[ImGuiCol_Tab] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
1752 style.Colors[ImGuiCol_TabHovered] = ImVec4(0.40f, 0.40f, 0.40f, 1.00f);
1753 style.Colors[ImGuiCol_TabActive] = ImVec4(0.33f, 0.33f, 0.33f, 1.00f);
1754 style.Colors[ImGuiCol_TabUnfocused] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
1755 style.Colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.33f, 0.33f, 0.33f, 1.00f);
1756
1757
1758# ifdef IMGUI_HAS_DOCK
1759 if (ImGui::GetIO().ConfigFlags & ImGuiConfigFlags_ViewportsEnable) {
1760 style.WindowRounding = 0.0f;
1761 style.Colors[ImGuiCol_WindowBg].w = 1.0f;
1762 }
1763
1764 style.Colors[ImGuiCol_DockingEmptyBg] = ImVec4(0.38f, 0.38f, 0.38f, 1.00f);
1765 style.Colors[ImGuiCol_DockingPreview] = ImVec4(0.85f, 0.85f, 0.85f, 0.28f);
1766# endif
1767 }
1768 break;
1769 case ImGuiStyle_VisualDark: {
1770 // Posted by @mnurzia here: https://github.com/ocornut/imgui/issues/2529 (hope I can use it)
1771 // (@mnurzia used a font named Segoe UI 16pt, and the Freetype rasterizer).
1772
1773 style.TabRounding = 0.0f;
1774 style.FrameBorderSize = 1.0f;
1775 style.ScrollbarRounding = 0.0f;
1776 style.ScrollbarSize = 10.0f;
1777 ImVec4* colors = style.Colors;
1778 colors[ImGuiCol_Text] = ImVec4(0.95f, 0.95f, 0.95f, 1.00f);
1779 colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
1780 colors[ImGuiCol_WindowBg] = ImVec4(0.12f, 0.12f, 0.12f, 1.00f);
1781 colors[ImGuiCol_ChildBg] = ImVec4(0.04f, 0.04f, 0.04f, 0.50f);
1782 colors[ImGuiCol_PopupBg] = ImVec4(0.12f, 0.12f, 0.12f, 0.94f);
1783 colors[ImGuiCol_Border] = ImVec4(0.25f, 0.25f, 0.27f, 0.50f);
1784 colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
1785 colors[ImGuiCol_FrameBg] = ImVec4(0.20f, 0.20f, 0.22f, 0.50f);
1786 colors[ImGuiCol_FrameBgHovered] = ImVec4(0.25f, 0.25f, 0.27f, 0.75f);
1787 colors[ImGuiCol_FrameBgActive] = ImVec4(0.30f, 0.30f, 0.33f, 1.00f);
1788 colors[ImGuiCol_TitleBg] = ImVec4(0.04f, 0.04f, 0.04f, 1.00f);
1789 colors[ImGuiCol_TitleBgActive] = ImVec4(0.04f, 0.04f, 0.04f, 1.00f);
1790 colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.04f, 0.04f, 0.04f, 0.75f);
1791 colors[ImGuiCol_MenuBarBg] = ImVec4(0.18f, 0.18f, 0.19f, 1.00f);
1792 colors[ImGuiCol_ScrollbarBg] = ImVec4(0.24f, 0.24f, 0.26f, 0.75f);
1793 colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.41f, 0.41f, 0.41f, 0.75f);
1794 colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.62f, 0.62f, 0.62f, 0.75f);
1795 colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.94f, 0.92f, 0.94f, 0.75f);
1796 colors[ImGuiCol_CheckMark] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
1797 colors[ImGuiCol_SliderGrab] = ImVec4(0.41f, 0.41f, 0.41f, 0.75f);
1798 colors[ImGuiCol_SliderGrabActive] = ImVec4(0.62f, 0.62f, 0.62f, 0.75f);
1799 colors[ImGuiCol_Button] = ImVec4(0.20f, 0.20f, 0.22f, 1.00f);
1800 colors[ImGuiCol_ButtonHovered] = ImVec4(0.25f, 0.25f, 0.27f, 1.00f);
1801 colors[ImGuiCol_ButtonActive] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
1802 colors[ImGuiCol_Header] = ImVec4(0.18f, 0.18f, 0.19f, 1.00f);
1803 colors[ImGuiCol_HeaderHovered] = ImVec4(0.25f, 0.25f, 0.27f, 1.00f);
1804 colors[ImGuiCol_HeaderActive] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
1805 colors[ImGuiCol_Separator] = ImVec4(0.25f, 0.25f, 0.27f, 1.00f);
1806 colors[ImGuiCol_SeparatorHovered] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
1807 colors[ImGuiCol_SeparatorActive] = ImVec4(0.62f, 0.62f, 0.62f, 1.00f);
1808 colors[ImGuiCol_ResizeGrip] = ImVec4(0.30f, 0.30f, 0.33f, 0.75f);
1809 colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.41f, 0.41f, 0.41f, 0.75f);
1810 colors[ImGuiCol_ResizeGripActive] = ImVec4(0.62f, 0.62f, 0.62f, 0.75f);
1811 colors[ImGuiCol_Tab] = ImVec4(0.21f, 0.21f, 0.22f, 1.00f);
1812 colors[ImGuiCol_TabHovered] = ImVec4(0.37f, 0.37f, 0.39f, 1.00f);
1813 colors[ImGuiCol_TabActive] = ImVec4(0.30f, 0.30f, 0.33f, 1.00f);
1814 colors[ImGuiCol_TabUnfocused] = ImVec4(0.12f, 0.12f, 0.12f, 0.97f);
1815 colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.18f, 0.18f, 0.19f, 1.00f);
1816 colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
1817 colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
1818 colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
1819 colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
1820 colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.50f);
1821 colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
1822 colors[ImGuiCol_NavHighlight] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
1823 colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
1824 colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
1825 colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
1826 style.WindowMenuButtonPosition = ImGuiDir_Right;
1827
1828# ifdef IMGUI_HAS_DOCK
1829 colors[ImGuiCol_DockingPreview] = ImVec4(0.26f, 0.59f, 0.98f, 0.50f);
1830 colors[ImGuiCol_DockingEmptyBg] = ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
1831# endif
1832 }
1833 break;
1835 // posted by @metasprite here: https://github.com/ocornut/imgui/issues/707 (hope I can use it)
1836
1837 ImVec4* colors = ImGui::GetStyle().Colors;
1838 colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
1839 colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
1840 colors[ImGuiCol_WindowBg] = ImVec4(0.29f, 0.34f, 0.26f, 1.00f);
1841 colors[ImGuiCol_ChildBg] = ImVec4(0.29f, 0.34f, 0.26f, 1.00f);
1842 colors[ImGuiCol_PopupBg] = ImVec4(0.24f, 0.27f, 0.20f, 1.00f);
1843 colors[ImGuiCol_Border] = ImVec4(0.54f, 0.57f, 0.51f, 0.50f);
1844 colors[ImGuiCol_BorderShadow] = ImVec4(0.14f, 0.16f, 0.11f, 0.52f);
1845 colors[ImGuiCol_FrameBg] = ImVec4(0.24f, 0.27f, 0.20f, 1.00f);
1846 colors[ImGuiCol_FrameBgHovered] = ImVec4(0.27f, 0.30f, 0.23f, 1.00f);
1847 colors[ImGuiCol_FrameBgActive] = ImVec4(0.30f, 0.34f, 0.26f, 1.00f);
1848 colors[ImGuiCol_TitleBg] = ImVec4(0.24f, 0.27f, 0.20f, 1.00f);
1849 colors[ImGuiCol_TitleBgActive] = ImVec4(0.29f, 0.34f, 0.26f, 1.00f);
1850 colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.00f, 0.00f, 0.00f, 0.51f);
1851 colors[ImGuiCol_MenuBarBg] = ImVec4(0.24f, 0.27f, 0.20f, 1.00f);
1852 colors[ImGuiCol_ScrollbarBg] = ImVec4(0.35f, 0.42f, 0.31f, 1.00f);
1853 colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.28f, 0.32f, 0.24f, 1.00f);
1854 colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.25f, 0.30f, 0.22f, 1.00f);
1855 colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.23f, 0.27f, 0.21f, 1.00f);
1856 colors[ImGuiCol_CheckMark] = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
1857 colors[ImGuiCol_SliderGrab] = ImVec4(0.35f, 0.42f, 0.31f, 1.00f);
1858 colors[ImGuiCol_SliderGrabActive] = ImVec4(0.54f, 0.57f, 0.51f, 0.50f);
1859 colors[ImGuiCol_Button] = ImVec4(0.29f, 0.34f, 0.26f, 0.40f);
1860 colors[ImGuiCol_ButtonHovered] = ImVec4(0.35f, 0.42f, 0.31f, 1.00f);
1861 colors[ImGuiCol_ButtonActive] = ImVec4(0.54f, 0.57f, 0.51f, 0.50f);
1862 colors[ImGuiCol_Header] = ImVec4(0.35f, 0.42f, 0.31f, 1.00f);
1863 colors[ImGuiCol_HeaderHovered] = ImVec4(0.35f, 0.42f, 0.31f, 0.6f);
1864 colors[ImGuiCol_HeaderActive] = ImVec4(0.54f, 0.57f, 0.51f, 0.50f);
1865 colors[ImGuiCol_Separator] = ImVec4(0.14f, 0.16f, 0.11f, 1.00f);
1866 colors[ImGuiCol_SeparatorHovered] = ImVec4(0.54f, 0.57f, 0.51f, 1.00f);
1867 colors[ImGuiCol_SeparatorActive] = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
1868 colors[ImGuiCol_ResizeGrip] = ImVec4(0.19f, 0.23f, 0.18f, 0.00f); // grip invis
1869 colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.54f, 0.57f, 0.51f, 1.00f);
1870 colors[ImGuiCol_ResizeGripActive] = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
1871 colors[ImGuiCol_Tab] = ImVec4(0.35f, 0.42f, 0.31f, 1.00f);
1872 colors[ImGuiCol_TabHovered] = ImVec4(0.54f, 0.57f, 0.51f, 0.78f);
1873 colors[ImGuiCol_TabActive] = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
1874 colors[ImGuiCol_TabUnfocused] = ImVec4(0.24f, 0.27f, 0.20f, 1.00f);
1875 colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.35f, 0.42f, 0.31f, 1.00f);
1876 colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
1877 colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
1878 colors[ImGuiCol_PlotHistogram] = ImVec4(1.00f, 0.78f, 0.28f, 1.00f);
1879 colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
1880 colors[ImGuiCol_TextSelectedBg] = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
1881 colors[ImGuiCol_DragDropTarget] = ImVec4(0.73f, 0.67f, 0.24f, 1.00f);
1882 colors[ImGuiCol_NavHighlight] = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
1883 colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
1884 colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
1885 colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
1886
1887 ImGuiStyle& style = ImGui::GetStyle();
1888 style.FrameBorderSize = 1.0f;
1889 style.WindowRounding = 0.0f;
1890 style.ChildRounding = 0.0f;
1891 style.FrameRounding = 0.0f;
1892 style.PopupRounding = 0.0f;
1893 style.ScrollbarRounding = 0.0f;
1894 style.GrabRounding = 0.0f;
1895 style.TabRounding = 0.0f;
1896
1897# ifdef IMGUI_HAS_DOCK
1898 colors[ImGuiCol_DockingPreview] = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
1899 colors[ImGuiCol_DockingEmptyBg] = ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
1900# endif
1901 }
1902 break;
1903 case ImGuiStyle_SoftLife: {
1904 // Just a quick variation of ImGuiStyle_SteamingLife style
1905
1906 ImVec4* colors = ImGui::GetStyle().Colors;
1907 colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
1908 colors[ImGuiCol_TextDisabled] = ImVec4(0.18f, 0.18f, 0.18f, 1.00f);
1909 colors[ImGuiCol_WindowBg] = ImVec4(0.37f, 0.49f, 0.41f, 1.00f);
1910 colors[ImGuiCol_ChildBg] = ImVec4(0.40f, 0.52f, 0.44f, 1.00f);
1911 colors[ImGuiCol_PopupBg] = ImVec4(0.45f, 0.60f, 0.47f, 1.00f);
1912 colors[ImGuiCol_Border] = ImVec4(0.25f, 0.28f, 0.25f, 0.50f);
1913 colors[ImGuiCol_BorderShadow] = ImVec4(0.51f, 0.74f, 0.54f, 0.52f);
1914 colors[ImGuiCol_FrameBg] = ImVec4(0.54f, 0.73f, 0.57f, 0.54f);
1915 colors[ImGuiCol_FrameBgHovered] = ImVec4(0.54f, 0.70f, 0.56f, 1.00f);
1916 colors[ImGuiCol_FrameBgActive] = ImVec4(0.42f, 0.55f, 0.45f, 1.00f);
1917 colors[ImGuiCol_TitleBg] = ImVec4(0.36f, 0.47f, 0.37f, 0.82f);
1918 colors[ImGuiCol_TitleBgActive] = ImVec4(0.39f, 0.57f, 0.54f, 1.00f);
1919 colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.36f, 0.47f, 0.37f, 0.53f);
1920 colors[ImGuiCol_MenuBarBg] = ImVec4(0.41f, 0.55f, 0.43f, 1.00f);
1921 colors[ImGuiCol_ScrollbarBg] = ImVec4(0.32f, 0.44f, 0.37f, 1.00f);
1922 colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.51f, 0.68f, 0.55f, 1.00f);
1923 colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.51f, 0.70f, 0.58f, 1.00f);
1924 colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.44f, 0.57f, 0.49f, 1.00f);
1925 colors[ImGuiCol_CheckMark] = ImVec4(0.25f, 0.42f, 0.13f, 1.00f);
1926 colors[ImGuiCol_SliderGrab] = ImVec4(0.32f, 0.44f, 0.36f, 1.00f);
1927 colors[ImGuiCol_SliderGrabActive] = ImVec4(0.32f, 0.36f, 0.33f, 0.50f);
1928 colors[ImGuiCol_Button] = ImVec4(0.26f, 0.35f, 0.29f, 1.00f);
1929 colors[ImGuiCol_ButtonHovered] = ImVec4(0.32f, 0.43f, 0.36f, 0.40f);
1930 colors[ImGuiCol_ButtonActive] = ImVec4(0.51f, 0.69f, 0.55f, 0.50f);
1931 colors[ImGuiCol_Header] = ImVec4(0.39f, 0.59f, 0.55f, 1.00f);
1932 colors[ImGuiCol_HeaderHovered] = ImVec4(0.49f, 0.75f, 0.70f, 0.71f);
1933 colors[ImGuiCol_HeaderActive] = ImVec4(0.75f, 1.00f, 0.93f, 0.57f);
1934 colors[ImGuiCol_Separator] = ImVec4(0.48f, 0.69f, 0.50f, 1.00f);
1935 colors[ImGuiCol_SeparatorHovered] = ImVec4(0.28f, 0.31f, 0.29f, 1.00f);
1936 colors[ImGuiCol_SeparatorActive] = ImVec4(0.29f, 0.49f, 0.15f, 1.00f);
1937 colors[ImGuiCol_ResizeGrip] = ImVec4(0.52f, 0.66f, 0.59f, 0.00f);
1938 colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.32f, 0.35f, 0.32f, 1.00f);
1939 colors[ImGuiCol_ResizeGripActive] = ImVec4(0.34f, 0.59f, 0.18f, 1.00f);
1940 colors[ImGuiCol_Tab] = ImVec4(0.43f, 0.58f, 0.48f, 1.00f);
1941 colors[ImGuiCol_TabHovered] = ImVec4(0.38f, 0.43f, 0.40f, 0.78f);
1942 colors[ImGuiCol_TabActive] = ImVec4(0.34f, 0.59f, 0.18f, 1.00f);
1943 colors[ImGuiCol_TabUnfocused] = ImVec4(0.54f, 0.73f, 0.57f, 1.00f);
1944 colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.43f, 0.58f, 0.48f, 1.00f);
1945 colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
1946 colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.34f, 0.59f, 0.18f, 1.00f);
1947 colors[ImGuiCol_PlotHistogram] = ImVec4(0.64f, 0.91f, 0.25f, 1.00f);
1948 colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.60f, 0.88f, 0.00f, 1.00f);
1949 colors[ImGuiCol_TextSelectedBg] = ImVec4(0.28f, 0.48f, 0.15f, 1.00f);
1950 colors[ImGuiCol_DragDropTarget] = ImVec4(0.37f, 0.62f, 0.20f, 1.00f);
1951 colors[ImGuiCol_NavHighlight] = ImVec4(0.28f, 0.49f, 0.15f, 1.00f);
1952 colors[ImGuiCol_NavWindowingHighlight] = ImVec4(0.90f, 0.90f, 0.90f, 0.70f);
1953 colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.71f, 0.71f, 0.71f, 0.20f);
1954 colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.68f, 0.68f, 0.68f, 0.35f);
1955
1956 ImGuiStyle& style = ImGui::GetStyle();
1957 style.FrameBorderSize = 1.0f;
1958 style.WindowRounding = 0.0f;
1959 style.ChildRounding = 0.0f;
1960 style.FrameRounding = 0.0f;
1961 style.PopupRounding = 0.0f;
1962 style.ScrollbarRounding = 0.0f;
1963 style.GrabRounding = 0.0f;
1964 style.TabRounding = 0.0f;
1965
1966# ifdef IMGUI_HAS_DOCK
1967 colors[ImGuiCol_DockingPreview] = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
1968 colors[ImGuiCol_DockingEmptyBg] = ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
1969# endif
1970 }
1971 break;
1973 // Posted by @CookiePLMonster here: https://github.com/ocornut/imgui/issues/707 (hope I can use it)
1974
1975 ImVec4* colors = ImGui::GetStyle().Colors;
1976 colors[ImGuiCol_Text] = ImVec4(0.92f, 0.92f, 0.92f, 1.00f);
1977 colors[ImGuiCol_TextDisabled] = ImVec4(0.44f, 0.44f, 0.44f, 1.00f);
1978 colors[ImGuiCol_WindowBg] = ImVec4(0.06f, 0.06f, 0.06f, 1.00f);
1979 colors[ImGuiCol_ChildBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
1980 colors[ImGuiCol_PopupBg] = ImVec4(0.08f, 0.08f, 0.08f, 0.94f);
1981 colors[ImGuiCol_Border] = ImVec4(0.51f, 0.36f, 0.15f, 1.00f);
1982 colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
1983 colors[ImGuiCol_FrameBg] = ImVec4(0.11f, 0.11f, 0.11f, 1.00f);
1984 colors[ImGuiCol_FrameBgHovered] = ImVec4(0.51f, 0.36f, 0.15f, 1.00f);
1985 colors[ImGuiCol_FrameBgActive] = ImVec4(0.78f, 0.55f, 0.21f, 1.00f);
1986 colors[ImGuiCol_TitleBg] = ImVec4(0.51f, 0.36f, 0.15f, 1.00f);
1987 colors[ImGuiCol_TitleBgActive] = ImVec4(0.91f, 0.64f, 0.13f, 1.00f);
1988 colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.00f, 0.00f, 0.00f, 0.51f);
1989 colors[ImGuiCol_MenuBarBg] = ImVec4(0.11f, 0.11f, 0.11f, 1.00f);
1990 colors[ImGuiCol_ScrollbarBg] = ImVec4(0.06f, 0.06f, 0.06f, 0.53f);
1991 colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.21f, 0.21f, 0.21f, 1.00f);
1992 colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.47f, 0.47f, 0.47f, 1.00f);
1993 colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.81f, 0.83f, 0.81f, 1.00f);
1994 colors[ImGuiCol_CheckMark] = ImVec4(0.78f, 0.55f, 0.21f, 1.00f);
1995 colors[ImGuiCol_SliderGrab] = ImVec4(0.91f, 0.64f, 0.13f, 1.00f);
1996 colors[ImGuiCol_SliderGrabActive] = ImVec4(0.91f, 0.64f, 0.13f, 1.00f);
1997 colors[ImGuiCol_Button] = ImVec4(0.51f, 0.36f, 0.15f, 1.00f);
1998 colors[ImGuiCol_ButtonHovered] = ImVec4(0.91f, 0.64f, 0.13f, 1.00f);
1999 colors[ImGuiCol_ButtonActive] = ImVec4(0.78f, 0.55f, 0.21f, 1.00f);
2000 colors[ImGuiCol_Header] = ImVec4(0.51f, 0.36f, 0.15f, 1.00f);
2001 colors[ImGuiCol_HeaderHovered] = ImVec4(0.91f, 0.64f, 0.13f, 1.00f);
2002 colors[ImGuiCol_HeaderActive] = ImVec4(0.93f, 0.65f, 0.14f, 1.00f);
2003 colors[ImGuiCol_Separator] = ImVec4(0.21f, 0.21f, 0.21f, 1.00f);
2004 colors[ImGuiCol_SeparatorHovered] = ImVec4(0.91f, 0.64f, 0.13f, 1.00f);
2005 colors[ImGuiCol_SeparatorActive] = ImVec4(0.78f, 0.55f, 0.21f, 1.00f);
2006 colors[ImGuiCol_ResizeGrip] = ImVec4(0.21f, 0.21f, 0.21f, 1.00f);
2007 colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.91f, 0.64f, 0.13f, 1.00f);
2008 colors[ImGuiCol_ResizeGripActive] = ImVec4(0.78f, 0.55f, 0.21f, 1.00f);
2009 colors[ImGuiCol_Tab] = ImVec4(0.51f, 0.36f, 0.15f, 1.00f);
2010 colors[ImGuiCol_TabHovered] = ImVec4(0.91f, 0.64f, 0.13f, 1.00f);
2011 colors[ImGuiCol_TabActive] = ImVec4(0.78f, 0.55f, 0.21f, 1.00f);
2012 colors[ImGuiCol_TabUnfocused] = ImVec4(0.07f, 0.10f, 0.15f, 0.97f);
2013 colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.14f, 0.26f, 0.42f, 1.00f);
2014 colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
2015 colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
2016 colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
2017 colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
2018 colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
2019 colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
2020 colors[ImGuiCol_NavHighlight] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
2021 colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
2022 colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
2023 colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
2024
2025 ImGuiStyle& style = ImGui::GetStyle();
2026 style.FramePadding = ImVec2(4, 2);
2027 style.ItemSpacing = ImVec2(10, 2);
2028 style.IndentSpacing = 12;
2029 style.ScrollbarSize = 10;
2030
2031 style.WindowRounding = 4;
2032 style.FrameRounding = 4;
2033 style.PopupRounding = 4;
2034 style.ScrollbarRounding = 6;
2035 style.GrabRounding = 4;
2036 style.TabRounding = 4;
2037
2038 style.WindowTitleAlign = ImVec2(1.0f, 0.5f);
2039 style.WindowMenuButtonPosition = ImGuiDir_Right;
2040
2041 style.DisplaySafeAreaPadding = ImVec2(4, 4);
2042
2043# ifdef IMGUI_HAS_DOCK
2044 //colors[ImGuiCol_DockingPreview] = ImVec4(0.59f, 0.54f, 0.18f, 1.00f);
2045 //colors[ImGuiCol_DockingEmptyBg] = ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
2046# endif
2047 }
2048 break;
2049 case ImGuiStyle_Windowed: {
2050 // Badly adapted from the Win98-DearImgui customization made by @JakeCoxon in his fork here https://github.com/JakeCoxon/imgui-win98 (hope I can use it)
2051 // Suggested font: MS Sans Serif.ttf
2052 ImGuiStyle& style = ImGui::GetStyle();
2053 ImVec4* colors = style.Colors;
2054
2055 style.FrameBorderSize = 1.0f;
2056 style.FramePadding = ImVec2(4.0f, 4.0f);
2057 style.WindowMenuButtonPosition = ImGuiDir_Right;
2058 style.ScrollbarSize = 16.0f;
2059 style.ChildRounding = style.FrameRounding = style.ScrollbarRounding = style.GrabRounding = style.TabRounding = style.WindowRounding = 0;
2060
2061 colors[ImGuiCol_Text] = ImVec4(0.00f, 0.00f, 0.00f, 1.00f);
2062 colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
2063 colors[ImGuiCol_WindowBg] = ImVec4(0.75f, 0.75f, 0.75f, 1.00f);
2064 colors[ImGuiCol_ChildBg] = ImVec4(0.75f, 0.75f, 0.75f, 1.00f);
2065 colors[ImGuiCol_PopupBg] = ImVec4(0.75f, 0.75f, 0.75f, 1.00f);
2066 colors[ImGuiCol_Border] = ImVec4(0.96f, 0.96f, 0.96f, 1.00f);
2067 colors[ImGuiCol_BorderShadow] = ImVec4(0.54f, 0.54f, 0.54f, 1.00f);
2068 colors[ImGuiCol_FrameBg] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
2069 colors[ImGuiCol_FrameBgHovered] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
2070 colors[ImGuiCol_FrameBgActive] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
2071 colors[ImGuiCol_TitleBg] = ImVec4(0.96f, 0.96f, 0.96f, 1.00f);
2072 colors[ImGuiCol_TitleBgActive] = ImVec4(0.15f, 0.57f, 0.88f, 1.00f);
2073 colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 1.00f, 1.00f, 0.51f);
2074 colors[ImGuiCol_MenuBarBg] = ImVec4(0.86f, 0.86f, 0.86f, 1.00f);
2075 colors[ImGuiCol_ScrollbarBg] = ImVec4(0.98f, 0.98f, 0.98f, 0.53f);
2076 colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.69f, 0.69f, 0.69f, 0.80f);
2077 colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.49f, 0.49f, 0.49f, 0.80f);
2078 colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.49f, 0.49f, 0.49f, 1.00f);
2079 colors[ImGuiCol_CheckMark] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
2080 colors[ImGuiCol_SliderGrab] = ImVec4(0.26f, 0.59f, 0.98f, 0.78f);
2081 colors[ImGuiCol_SliderGrabActive] = ImVec4(0.46f, 0.54f, 0.80f, 0.60f);
2082 colors[ImGuiCol_Button] = ImVec4(0.26f, 0.59f, 0.98f, 0.40f);
2083 colors[ImGuiCol_ButtonHovered] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
2084 colors[ImGuiCol_ButtonActive] = ImVec4(0.06f, 0.53f, 0.98f, 1.00f);
2085 colors[ImGuiCol_Header] = ImVec4(0.75f, 0.75f, 0.75f, 1.00f);
2086 colors[ImGuiCol_HeaderHovered] = ImVec4(0.75f, 0.75f, 0.75f, 1.00f);
2087 colors[ImGuiCol_HeaderActive] = ImVec4(0.6f, 0.7f, 0.82f, 1.00f);
2088 colors[ImGuiCol_Separator] = ImVec4(0.39f, 0.39f, 0.39f, 0.62f);
2089 colors[ImGuiCol_SeparatorHovered] = ImVec4(0.14f, 0.44f, 0.80f, 0.78f);
2090 colors[ImGuiCol_SeparatorActive] = ImVec4(0.14f, 0.44f, 0.80f, 1.00f);
2091 colors[ImGuiCol_ResizeGrip] = ImVec4(0.80f, 0.80f, 0.80f, 0.56f);
2092 colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f);
2093 colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
2094 colors[ImGuiCol_Tab] = ImVec4(0.76f, 0.80f, 0.84f, 0.95f);
2095 colors[ImGuiCol_TabHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
2096 colors[ImGuiCol_TabActive] = ImVec4(0.60f, 0.73f, 0.88f, 0.95f);
2097 colors[ImGuiCol_TabUnfocused] = ImVec4(0.92f, 0.92f, 0.94f, 0.95f);
2098 colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.74f, 0.82f, 0.91f, 1.00f);
2099 colors[ImGuiCol_PlotLines] = ImVec4(0.39f, 0.39f, 0.39f, 1.00f);
2100 colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
2101 colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
2102 colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.45f, 0.00f, 1.00f);
2103 colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
2104 colors[ImGuiCol_DragDropTarget] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
2105 colors[ImGuiCol_NavHighlight] = colors[ImGuiCol_HeaderHovered];
2106 colors[ImGuiCol_NavWindowingHighlight] = ImVec4(0.70f, 0.70f, 0.70f, 0.70f);
2107 colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.20f);
2108 colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
2109
2110 }
2111 break;
2113 // Posted by @OverShifted here: https://github.com/ocornut/imgui/issues/707 (hope I can use it)
2114 ImGuiStyle& style = ImGui::GetStyle();
2115 ImVec4* colors = style.Colors;
2116
2117 colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
2118 colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
2119 colors[ImGuiCol_WindowBg] = ImVec4(0.13f, 0.14f, 0.15f, 1.00f);
2120 colors[ImGuiCol_ChildBg] = ImVec4(0.13f, 0.14f, 0.15f, 1.00f);
2121 colors[ImGuiCol_PopupBg] = ImVec4(0.13f, 0.14f, 0.15f, 1.00f);
2122 colors[ImGuiCol_Border] = ImVec4(0.43f, 0.43f, 0.50f, 0.50f);
2123 colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
2124 colors[ImGuiCol_FrameBg] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
2125 colors[ImGuiCol_FrameBgHovered] = ImVec4(0.38f, 0.38f, 0.38f, 1.00f);
2126 colors[ImGuiCol_FrameBgActive] = ImVec4(0.67f, 0.67f, 0.67f, 0.39f);
2127 colors[ImGuiCol_TitleBg] = ImVec4(0.08f, 0.08f, 0.09f, 1.00f);
2128 colors[ImGuiCol_TitleBgActive] = ImVec4(0.08f, 0.08f, 0.09f, 1.00f);
2129 colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.00f, 0.00f, 0.00f, 0.51f);
2130 colors[ImGuiCol_MenuBarBg] = ImVec4(0.14f, 0.14f, 0.14f, 1.00f);
2131 colors[ImGuiCol_ScrollbarBg] = ImVec4(0.02f, 0.02f, 0.02f, 0.53f);
2132 colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
2133 colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
2134 colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.51f, 0.51f, 0.51f, 1.00f);
2135 colors[ImGuiCol_CheckMark] = ImVec4(0.11f, 0.64f, 0.92f, 1.00f);
2136 colors[ImGuiCol_SliderGrab] = ImVec4(0.11f, 0.64f, 0.92f, 1.00f);
2137 colors[ImGuiCol_SliderGrabActive] = ImVec4(0.08f, 0.50f, 0.72f, 1.00f);
2138 colors[ImGuiCol_Button] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
2139 colors[ImGuiCol_ButtonHovered] = ImVec4(0.38f, 0.38f, 0.38f, 1.00f);
2140 colors[ImGuiCol_ButtonActive] = ImVec4(0.67f, 0.67f, 0.67f, 0.39f);
2141 colors[ImGuiCol_Header] = ImVec4(0.22f, 0.22f, 0.22f, 1.00f);
2142 colors[ImGuiCol_HeaderHovered] = ImVec4(0.25f, 0.25f, 0.25f, 1.00f);
2143 colors[ImGuiCol_HeaderActive] = ImVec4(0.67f, 0.67f, 0.67f, 0.39f);
2144 colors[ImGuiCol_Separator] = colors[ImGuiCol_Border];
2145 colors[ImGuiCol_SeparatorHovered] = ImVec4(0.41f, 0.42f, 0.44f, 1.00f);
2146 colors[ImGuiCol_SeparatorActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
2147 colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
2148 colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.29f, 0.30f, 0.31f, 0.67f);
2149 colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f);
2150 colors[ImGuiCol_Tab] = ImVec4(0.08f, 0.08f, 0.09f, 0.83f);
2151 colors[ImGuiCol_TabHovered] = ImVec4(0.33f, 0.34f, 0.36f, 0.83f);
2152 colors[ImGuiCol_TabActive] = ImVec4(0.23f, 0.23f, 0.24f, 1.00f);
2153 colors[ImGuiCol_TabUnfocused] = ImVec4(0.08f, 0.08f, 0.09f, 1.00f);
2154 colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.13f, 0.14f, 0.15f, 1.00f);
2155 colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
2156 colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
2157 colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
2158 colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
2159 colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
2160 colors[ImGuiCol_DragDropTarget] = ImVec4(0.11f, 0.64f, 0.92f, 1.00f);
2161 colors[ImGuiCol_NavHighlight] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
2162 colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
2163 colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
2164 colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
2165 style.GrabRounding = style.FrameRounding = 2.3f;
2166
2167# ifdef IMGUI_HAS_DOCK
2168 colors[ImGuiCol_DockingPreview] = ImVec4(0.26f, 0.59f, 0.98f, 0.70f);
2169 colors[ImGuiCol_DockingEmptyBg] = ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
2170# endif
2171 }
2172 break;
2173 default:
2174 break;
2175 }
2176
2177 return true;
2178}
2179static const char* DefaultStyleNames[ImGuiStyle_Count]={"DefaultClassic","DefaultDark","DefaultLight","Gray","Light","BlackCodz01","DarkCodz01","GrayCodz01","Purple","Cherry","DarkOpaque","Soft","EdinBlack","EdinWhite","Maya","LightGreen","Design","Dracula","Greenish","C64","PhotoStore","CorporateGreyFlat","CorporateGreyFramed","VisualDark","SteamingLife","SoftLife","GoldenBlack","Windowed","OverShiftedBlack","DarkOpaqueInverse","GrayCodz01Inverse","PurpleInverse","LightGreenInverse","DesignInverse"};
2180const char** GetDefaultStyleNames() {return &DefaultStyleNames[0];}
2181
2182} // namespace ImGui
2183
2184
#define IM_ASSERT(_EXPR)
#define CHERRY_LOW(v)
#define CHERRY_HI(v)
#define CHERRY_MED(v)
static size_t ImFormatString(char *buf, size_t buf_size, const char *fmt,...)
#define CHERRY_TEXT(v)
#define CHERRY_BG(v)
#define IM_ARRAYSIZE(_ARR)
@ ImGuiStyle_EdinBlack
@ ImGuiStyle_DarkOpaque
@ ImGuiStyle_Greenish
@ ImGuiStyle_C64
@ ImGuiStyle_DesignInverse
@ ImGuiStyle_DefaultLight
@ ImGuiStyle_GrayCodz01
@ ImGuiStyle_Light
@ ImGuiStyle_Purple
@ ImGuiStyle_SoftLife
@ ImGuiStyle_Design
@ ImGuiStyle_PhotoStore
@ ImGuiStyle_Maya
@ ImGuiStyle_OverShiftedBlack
@ ImGuiStyle_DefaultClassic
@ ImGuiStyle_PurpleInverse
@ ImGuiStyle_Cherry
@ ImGuiStyle_LightGreen
@ ImGuiStyle_Gray
@ ImGuiStyle_BlackCodz01
@ ImGuiStyle_Soft
@ ImGuiStyle_CorporateGreyFlat
@ ImGuiStyle_EdinWhite
@ ImGuiStyle_Count
@ ImGuiStyle_GoldenBlack
@ ImGuiStyle_DarkOpaqueInverse
@ ImGuiStyle_DarkCodz01
@ ImGuiStyle_Windowed
@ ImGuiStyle_LightGreenInverse
@ ImGuiStyle_VisualDark
@ ImGuiStyle_Dracula
@ ImGuiStyle_GrayCodz01Inverse
@ ImGuiStyle_SteamingLife
@ ImGuiStyle_DefaultDark
@ ImGuiStyle_CorporateGreyFramed
static const char * DefaultStyleNames[ImGuiStyle_Count]
void ChangeStyleColors(ImGuiStyle &style, float satThresholdForInvertingLuminance, float shiftHue)
static void ChangeStyleColorsHue(ImGuiStyle &style, float shiftHue=0.f)
bool SelectStyleCombo(const char *label, int *selectedIndex, int maxNumItemsToDisplay, ImGuiStyle *styleToChange)
static ImVec4 ImColorLerp(const ImVec4 &a, const ImVec4 &b, float t)
static void CreateDefaultTabColorsFor(ImGuiStyle &style, ImGuiCol baseHoveredColor=ImGuiCol_HeaderHovered, float hoveredLerp=0.5f, const ImVec2 &tabsLerps=ImVec2(0.15f, 0.8f), const ImVec2 &unfocusedTabsLerp=ImVec2(0.1f, 0.5f))
bool ResetStyle(int styleEnum, ImGuiStyle &style)
const char ** GetDefaultStyleNames()
bool SaveStyle(const char *filename, const ImGuiStyle &style)
static void InvertStyleColors(ImGuiStyle &style)
bool LoadStyle(const char *filename, ImGuiStyle &style)
static ImVec4 ConvertTitleBgColFromPrevVersion(const ImVec4 &win_bg_col, const ImVec4 &title_bg_col)
#define SEEK_SET
Definition: zip.c:88
#define SEEK_END
Definition: zip.c:84