Zen 0.3.0
Loading...
Searching...
No Matches
ZEN_Style.cpp
1#include <zen/gui/ZEN_Style.h>
2
3#include <include/imgui/imgui.h>
4namespace Zen {
5 void styleSetup() {
6 // Zen Style
7 ImGuiStyle &style = ImGui::GetStyle();
8
9 style.Alpha = 1.0f;
10 style.DisabledAlpha = 1.0f;
11 style.WindowPadding = ImVec2(20.0f, 20.0f);
12 style.WindowRounding = 8.0f;
13 style.WindowBorderSize = 1.0f;
14 style.WindowMinSize = ImVec2(20.0f, 20.0f);
15 style.WindowTitleAlign = ImVec2(0.5f, 0.5f);
16 style.WindowMenuButtonPosition = ImGuiDir_None;
17 style.ChildRounding = 10.0f;
18 style.ChildBorderSize = 1.0f;
19 style.PopupRounding = 16.0f;
20 style.PopupBorderSize = 1.0f;
21 style.FramePadding = ImVec2(20.0f, 4.0f);
22 style.FrameRounding = 12.0f;
23 style.FrameBorderSize = 1.0f;
24 style.ItemSpacing = ImVec2(8.0f, 12.0f);
25 style.ItemInnerSpacing = ImVec2(8.0f, 2.0f);
26 style.CellPadding = ImVec2(12.0f, 8.0f);
27 style.IndentSpacing = 0.0f;
28
29 style.ScrollbarSize = 12.0f;
30 style.ScrollbarRounding = 20.0f;
31 style.GrabMinSize = 12.0f;
32 style.GrabRounding = 20.0f;
33 style.TabRounding = 12.0f;
34 style.TabBorderSize = 1.0f;
35
36 style.ColorButtonPosition = ImGuiDir_Right;
37 style.ButtonTextAlign = ImVec2(0.5f, 0.5f);
38 style.SelectableTextAlign = ImVec2(0.0f, 0.0f);
39
40 style.Colors[ImGuiCol_Text] = ImVec4(1.0f, 1.0f, 1.0f, 1.0f);
41 style.Colors[ImGuiCol_TextDisabled] =
42 ImVec4(0.2745098173618317f, 0.3176470696926117f, 0.4509803950786591f, 1.0f);
43
44 style.Colors[ImGuiCol_WindowBg] =
45 ImVec4(0.0784313753247261f, 0.08627451211214066f, 0.1019607856869698f, 1.0f);
46 style.Colors[ImGuiCol_ChildBg] =
47 ImVec4(0.09411764889955521f, 0.1019607856869698f, 0.1176470592617989f, 1.0f);
48 style.Colors[ImGuiCol_PopupBg] =
49 ImVec4(0.01960784383118153f, 0.09803921729326248f, 0.1372549086809158f, 1.0f);
50
51 style.Colors[ImGuiCol_Border] =
52 ImVec4(0.1777524054050446f, 0.2026628106832504f, 0.2145922780036926f, 1.0f);
53 style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.01960784383118153f,
54 0.09803921729326248f,
55 0.1372549086809158f,
56 0.09442061185836792f);
57
58 style.Colors[ImGuiCol_FrameBg] =
59 ImVec4(0.1137254908680916f, 0.125490203499794f, 0.1529411822557449f, 1.0f);
60 style.Colors[ImGuiCol_FrameBgHovered] =
61 ImVec4(0.0f, 0.1882352977991104f, 0.2784313857555389f, 1.0f);
62 style.Colors[ImGuiCol_FrameBgActive] =
63 ImVec4(0.0f, 0.1882352977991104f, 0.2784313857555389f, 1.0f);
64
65 style.Colors[ImGuiCol_TitleBg] =
66 ImVec4(0.0470588244497776f, 0.05490196123719215f, 0.07058823853731155f, 1.0f);
67 style.Colors[ImGuiCol_TitleBgActive] =
68 ImVec4(0.0117647061124444f, 0.05098039284348488f, 0.07058823853731155f, 1.0f);
69 style.Colors[ImGuiCol_TitleBgCollapsed] =
70 ImVec4(0.01960784383118153f, 0.09803921729326248f, 0.1372549086809158f, 1.0f);
71 style.Colors[ImGuiCol_MenuBarBg] =
72 ImVec4(0.0f, 0.08627451211214066f, 0.1372549086809158f, 1.0f);
73
74 style.Colors[ImGuiCol_ScrollbarBg] =
75 ImVec4(0.1490196138620377f, 0.1647058874368668f, 0.1725490242242813f, 1.0f);
76 style.Colors[ImGuiCol_ScrollbarGrab] =
77 ImVec4(0.3843137323856354f, 0.5254902243614197f, 0.5960784554481506f, 1.0f);
78 style.Colors[ImGuiCol_ScrollbarGrabHovered] =
79 ImVec4(0.0f, 0.6509804129600525f, 0.9843137264251709f, 1.0f);
80 style.Colors[ImGuiCol_ScrollbarGrabActive] =
81 ImVec4(0.3843137323856354f, 0.5254902243614197f, 0.5960784554481506f, 1.0f);
82
83 style.Colors[ImGuiCol_CheckMark] = ImVec4(0.0f, 0.6509804129600525f, 0.9843137264251709f, 1.0f);
84 style.Colors[ImGuiCol_SliderGrab] =
85 ImVec4(0.3843137323856354f, 0.5254902243614197f, 0.5960784554481506f, 1.0f);
86 style.Colors[ImGuiCol_SliderGrabActive] =
87 ImVec4(0.3843137323856354f, 0.5254902243614197f, 0.5960784554481506f, 1.0f);
88
89 style.Colors[ImGuiCol_Button] = ImVec4(0.0f, 0.1176470592617989f, 0.1843137294054031f, 1.0f);
90 style.Colors[ImGuiCol_ButtonHovered] =
91 ImVec4(0.0f, 0.1882352977991104f, 0.2784313857555389f, 1.0f);
92 style.Colors[ImGuiCol_ButtonActive] =
93 ImVec4(0.1529411822557449f, 0.1529411822557449f, 0.1529411822557449f, 1.0f);
94
95 style.Colors[ImGuiCol_Header] =
96 ImVec4(0.1411764770746231f, 0.1647058874368668f, 0.2078431397676468f, 1.0f);
97 style.Colors[ImGuiCol_HeaderHovered] =
98 ImVec4(0.0f, 0.1882352977991104f, 0.2784313857555389f, 1.0f);
99 style.Colors[ImGuiCol_HeaderActive] =
100 ImVec4(0.0784313753247261f, 0.08627451211214066f, 0.1019607856869698f, 1.0f);
101
102 style.Colors[ImGuiCol_Separator] =
103 ImVec4(0.1294117718935013f, 0.1490196138620377f, 0.1921568661928177f, 1.0f);
104 style.Colors[ImGuiCol_SeparatorHovered] =
105 ImVec4(0.1568627506494522f, 0.1843137294054031f, 0.250980406999588f, 1.0f);
106 style.Colors[ImGuiCol_SeparatorActive] =
107 ImVec4(0.1568627506494522f, 0.1843137294054031f, 0.250980406999588f, 1.0f);
108
109 style.Colors[ImGuiCol_ResizeGrip] =
110 ImVec4(0.1450980454683304f, 0.1450980454683304f, 0.1450980454683304f, 1.0f);
111 style.Colors[ImGuiCol_ResizeGripHovered] =
112 ImVec4(0.0f, 0.6509804129600525f, 0.9843137264251709f, 1.0f);
113 style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(1.0f, 1.0f, 1.0f, 1.0f);
114
115 const ImVec4 col_Tab =
116 ImVec4(0.0784313753247261f, 0.08627451211214066f, 0.1019607856869698f, 1.0f);
117 const ImVec4 col_TabHovered = ImVec4(0.0f, 0.1176470592617989f, 0.1843137294054031f, 1.0f);
118 const ImVec4 col_TabActive = ImVec4(0.0f, 0.1176470592617989f, 0.1843137294054031f, 1.0f);
119 const ImVec4 col_TabUnfocused =
120 ImVec4(0.0784313753247261f, 0.08627451211214066f, 0.1019607856869698f, 1.0f);
121 const ImVec4 col_TabUnfocusedActive =
122 ImVec4(0.125490203499794f, 0.2745098173618317f, 0.572549045085907f, 1.0f);
123
124 style.Colors[ImGuiCol_Tab] = col_Tab;
125 style.Colors[ImGuiCol_TabHovered] = col_TabHovered;
126 style.Colors[ImGuiCol_TabSelected] = col_TabActive;
127 style.Colors[ImGuiCol_TabSelectedOverline] = col_TabActive;
128 style.Colors[ImGuiCol_TabDimmed] = col_TabUnfocused;
129 style.Colors[ImGuiCol_TabDimmedSelected] = col_TabUnfocusedActive;
130 style.Colors[ImGuiCol_TabDimmedSelectedOverline] = col_TabUnfocusedActive;
131
132 style.Colors[ImGuiCol_PlotLines] =
133 ImVec4(0.5215686559677124f, 0.6000000238418579f, 0.7019608020782471f, 1.0f);
134 style.Colors[ImGuiCol_PlotLinesHovered] =
135 ImVec4(0.0f, 0.6509804129600525f, 0.9843137264251709f, 1.0f);
136 style.Colors[ImGuiCol_PlotHistogram] =
137 ImVec4(0.0f, 0.6509804129600525f, 0.9843137264251709f, 1.0f);
138 style.Colors[ImGuiCol_PlotHistogramHovered] =
139 ImVec4(0.0f, 0.9803921580314636f, 0.9725490212440491f, 1.0f);
140
141 style.Colors[ImGuiCol_TableHeaderBg] =
142 ImVec4(0.0117647061124444f, 0.05098039284348488f, 0.07058823853731155f, 1.0f);
143 style.Colors[ImGuiCol_TableBorderStrong] =
144 ImVec4(0.0117647061124444f, 0.05098039284348488f, 0.07058823853731155f, 1.0f);
145 style.Colors[ImGuiCol_TableBorderLight] = ImVec4(0.0f, 0.0f, 0.0f, 1.0f);
146 style.Colors[ImGuiCol_TableRowBg] =
147 ImVec4(0.0f, 0.1176470592617989f, 0.1843137294054031f, 1.0f);
148 style.Colors[ImGuiCol_TableRowBgAlt] =
149 ImVec4(0.01960784383118153f, 0.09803921729326248f, 0.1372549086809158f, 1.0f);
150
151 style.Colors[ImGuiCol_TextSelectedBg] =
152 ImVec4(0.3490196168422699f, 0.5372549295425415f, 0.6313725709915161f, 0.5665236115455627f);
153 style.Colors[ImGuiCol_DragDropTarget] =
154 ImVec4(0.4980392158031464f, 0.5137255191802979f, 1.0f, 1.0f);
155
156 style.Colors[ImGuiCol_NavCursor] = ImVec4(0.2666666805744171f, 0.2901960909366608f, 1.0f, 1.0f);
157 style.Colors[ImGuiCol_NavWindowingHighlight] =
158 ImVec4(0.4980392158031464f, 0.5137255191802979f, 1.0f, 1.0f);
159 style.Colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.01960784383118153f,
160 0.09803921729326248f,
161 0.1372549086809158f,
162 0.3764705955982208f);
163 style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.01960784383118153f,
164 0.09803921729326248f,
165 0.1372549086809158f,
166 0.3776823878288269f);
167
168 style.Colors[ImGuiCol_DockingPreview] =
169 ImVec4(0.0f, 0.6509804129600525f, 0.9843137264251709f, 1.0f);
170 style.Colors[ImGuiCol_DockingEmptyBg] = style.Colors[ImGuiCol_WindowBg];
171 }
172} // namespace Zen