Setting common style across samples.
Set Dark Style.
Set Style.
Set Botton Style.
Set Normal Style.
Set Active Style.
Set Hovered Style.
Set Dark Style.
Set Style.
Set Botton Style.
Set Normal Style.
Set Active Style.
Set Hovered Style.
24 {
26
30 ImGui::StyleColorsDark();
31
35 ImGuiStyle& style = ImGui::GetStyle();
36 style.WindowRounding = 0.0f;
37 style.WindowBorderSize = 0.0f;
38 style.WindowPadding = ImVec2(3.0f, 3.0f);
39 style.ColorButtonPosition = ImGuiDir_Left;
40 style.FrameRounding = 4.0f;
41 style.FrameBorderSize = 0.0f;
42 style.FramePadding = ImVec2(2.0f, 2.0f);
43 style.GrabRounding = 4.0f;
44 style.IndentSpacing = 12.0f;
45 style.ItemSpacing = ImVec2(2.0f, 2.0f);
46 style.ScrollbarSize = 4.0f;
47 style.SeparatorTextAlign = ImVec2(0.0f, 0.5f);
48 style.SeparatorTextPadding = ImVec2(0.0f, 0.0f);
49 style.SeparatorTextBorderSize = 1.0f;
50 style.GrabMinSize = 2.0f;
51 style.Colors[ImGuiCol_WindowBg] = ImVec4(0.27f, 0.27f, 0.27f, 1.0f);
52 style.Colors[ImGuiCol_MenuBarBg] = style.Colors[ImGuiCol_WindowBg];
53 style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.2f, 0.2f, 0.2f, 1.0f);
54 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.135f, 0.135f, 0.135f, 1.0f);
55 style.Colors[ImGuiCol_Border] = ImVec4(0.141f, 0.129f, 0.121f, 1.0f);
56 style.Colors[ImGuiCol_FrameBg] = ImVec4(0.125f, 0.129f, 0.137f, 1.0f);
57 style.Colors[ImGuiCol_PopupBg] = ImVec4(0.22f, 0.231f, 0.239f, 1.0f);
58 style.Colors[ImGuiCol_TabUnfocused] = style.Colors[ImGuiCol_WindowBg];
59 style.Colors[ImGuiCol_TabActive] = style.Colors[ImGuiCol_WindowBg];
60 style.Colors[ImGuiCol_TabUnfocusedActive] = style.Colors[ImGuiCol_WindowBg];
61 style.Colors[ImGuiCol_TabHovered] = ImVec4(0.2f, 0.2f, 0.2f, 1.0f);
62
66 style.Colors[ImGuiCol_Button] = style.Colors[ImGuiCol_WindowBg];
67 style.Colors[ImGuiCol_ButtonActive] = style.Colors[ImGuiCol_FrameBg];
68 style.Colors[ImGuiCol_ButtonHovered]= ImVec4(0.3f, 0.3f, 0.3f, 1.0f);
69
73 constexpr ImVec4 normal_color(0.465f, 0.465f, 0.525f, 1.0f);
74 std::vector<ImGuiCol> to_change_nrm;
75 to_change_nrm.push_back(ImGuiCol_Header);
76 to_change_nrm.push_back(ImGuiCol_SliderGrab);
77 to_change_nrm.push_back(ImGuiCol_CheckMark);
78 to_change_nrm.push_back(ImGuiCol_ResizeGrip);
79 to_change_nrm.push_back(ImGuiCol_TextSelectedBg);
80 to_change_nrm.push_back(ImGuiCol_Separator);
81 to_change_nrm.push_back(ImGuiCol_FrameBgActive);
82 for (auto c : to_change_nrm)
83 {
84 style.Colors[c] = normal_color;
85 }
86
90 constexpr ImVec4 active_color(0.365f, 0.365f, 0.425f, 1.0f);
91 std::vector<ImGuiCol> to_change_act;
92 to_change_act.push_back(ImGuiCol_HeaderActive);
93 to_change_act.push_back(ImGuiCol_SliderGrabActive);
94 to_change_act.push_back(ImGuiCol_ResizeGripActive);
95 to_change_act.push_back(ImGuiCol_SeparatorActive);
96 for (auto c : to_change_act)
97 {
98 style.Colors[c] = active_color;
99 }
100
104 constexpr ImVec4 hovered_color(0.565f, 0.565f, 0.625f, 1.0f);
105 std::vector<ImGuiCol> to_change_hover;
106 to_change_hover.push_back(ImGuiCol_HeaderHovered);
107 to_change_hover.push_back(ImGuiCol_FrameBgHovered);
108 to_change_hover.push_back(ImGuiCol_ResizeGripHovered);
109 to_change_hover.push_back(ImGuiCol_SeparatorHovered);
110 for (auto c : to_change_hover)
111 {
112 style.Colors[c] = hovered_color;
113 }
114
115 style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.465f, 0.465f, 0.465f, 1.0f);
116 style.Colors[ImGuiCol_TitleBg] = ImVec4(0.125f, 0.125f, 0.125f, 1.0f);
117 style.Colors[ImGuiCol_Tab] = ImVec4(0.05f, 0.05f, 0.05f, 0.5f);
118 style.Colors[ImGuiCol_TabHovered] = ImVec4(0.465f, 0.495f, 0.525f, 1.0f);
119 style.Colors[ImGuiCol_TabActive] = ImVec4(0.282f, 0.290f, 0.302f, 1.0f);
120 style.Colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.465f, 0.465f, 0.465f, 0.350f);
121
122
123
124 ImGui::SetColorEditOptions(ImGuiColorEditFlags_Float | ImGuiColorEditFlags_PickerHueWheel);
125 }
#define SPICES_PROFILE_ZONE