1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
#ifndef IMGUI_STYLE_H
#define IMGUI_STYLE_H
#include "imgui.h"
inline void ApplyDebugTheme () {
auto& style = ImGui::GetStyle();
style.WindowRounding = 8.0f;
style.WindowPadding = ImVec2( 12.0f, 12.0f );
style.DisabledAlpha = 1.0f;
style.Alpha = 1.0f;
}
inline void ApplyImguiTheme () {
ImGui::StyleColorsDark();
ImGuiStyle& style = ImGui::GetStyle();
style.DisabledAlpha = 1.0f;
style.Alpha = 1.0f;
style.WindowRounding = 4.0f;
style.FrameRounding = 4.0f;
style.GrabRounding = 4.0f;
style.WindowBorderSize = 0.0f;
style.FrameBorderSize = 0.0f;
style.ItemSpacing = ImVec2( 8.0f, 6.0f );
const float accentR = 0.95f;
const float accentG = 0.95f;
const float accentB = 0.95f;
ImVec4* colors = style.Colors;
colors[ImGuiCol_Text] = ImVec4( 0.95f, 0.95f, 0.95f, 1.00f );
colors[ImGuiCol_TextDisabled] = ImVec4( 0.60f, 0.60f, 0.60f, 1.00f );
colors[ImGuiCol_WindowBg] = ImVec4( 0.06f, 0.06f, 0.06f, 0.95f );
colors[ImGuiCol_ChildBg] = ImVec4( 0.06f, 0.06f, 0.06f, 0.95f );
colors[ImGuiCol_PopupBg] = ImVec4( 0.06f, 0.06f, 0.08f, 0.95f );
colors[ImGuiCol_Border] = ImVec4( 0.15f, 0.15f, 0.15f, 0.50f );
colors[ImGuiCol_BorderShadow] = ImVec4( 0.00f, 0.00f, 0.00f, 0.00f );
colors[ImGuiCol_FrameBg] = ImVec4( 0.10f, 0.10f, 0.12f, 0.90f );
colors[ImGuiCol_FrameBgHovered] = ImVec4( 0.20f, 0.20f, 0.20f, 0.95f );
colors[ImGuiCol_FrameBgActive] = ImVec4( 0.24f, 0.24f, 0.24f, 0.95f );
colors[ImGuiCol_TitleBg] = ImVec4( 0.08f, 0.08f, 0.08f, 0.95f );
colors[ImGuiCol_TitleBgActive] = ImVec4( 0.06f, 0.06f, 0.06f, 0.95f );
colors[ImGuiCol_TitleBgCollapsed] = ImVec4( 0.00f, 0.00f, 0.00f, 0.51f );
colors[ImGuiCol_MenuBarBg] = ImVec4( 0.08f, 0.08f, 0.08f, 0.95f );
colors[ImGuiCol_Button] = ImVec4( 0.12f, 0.12f, 0.14f, 0.95f );
colors[ImGuiCol_ButtonHovered] = ImVec4( accentR * 0.85f, accentG * 0.85f, accentB * 0.85f, 0.95f );
colors[ImGuiCol_ButtonActive] = ImVec4( 0.08f, 0.08f, 0.08f, 0.95f );
colors[ImGuiCol_Header] = ImVec4( 0.08f, 0.08f, 0.08f, 0.95f );
colors[ImGuiCol_HeaderHovered] = ImVec4( accentR * 0.85f, accentG * 0.85f, accentB * 0.85f, 0.95f );
colors[ImGuiCol_HeaderActive] = ImVec4( accentR * 0.75f, accentG * 0.75f, accentB * 0.75f, 0.95f );
colors[ImGuiCol_Separator] = ImVec4( 0.12f, 0.12f, 0.14f, 1.00f );
colors[ImGuiCol_SeparatorHovered] = ImVec4( accentR * 0.85f, accentG * 0.85f, accentB * 0.85f, 0.95f );
colors[ImGuiCol_SeparatorActive] = ImVec4( accentR * 0.75f, accentG * 0.75f, accentB * 0.75f, 1.00f );
colors[ImGuiCol_Tab] = ImVec4( 0.10f, 0.10f, 0.12f, 0.95f );
colors[ImGuiCol_TabHovered] = ImVec4( accentR * 0.85f, accentG * 0.85f, accentB * 0.85f, 0.95f );
colors[ImGuiCol_TabActive] = ImVec4( accentR * 0.75f, accentG * 0.75f, accentB * 0.75f, 0.95f );
colors[ImGuiCol_CheckMark] = ImVec4( accentR * 0.85f, accentG * 0.85f, accentB * 0.85f, 0.95f );
colors[ImGuiCol_SliderGrab] = ImVec4( accentR * 0.85f, accentG * 0.85f, accentB * 0.85f, 0.95f );
colors[ImGuiCol_SliderGrabActive] = ImVec4( accentR * 0.75f, accentG * 0.75f, accentB * 0.75f, 0.95f );
colors[ImGuiCol_ScrollbarBg] = ImVec4( 0.05f, 0.05f, 0.06f, 0.90f );
colors[ImGuiCol_ScrollbarGrab] = ImVec4( 0.12f, 0.12f, 0.14f, 0.95f );
colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4( accentR * 0.85f, accentG * 0.85f, accentB * 0.85f, 0.95f );
colors[ImGuiCol_ScrollbarGrabActive] = ImVec4( accentR * 0.75f, accentG * 0.75f, accentB * 0.75f, 0.95f );
colors[ImGuiCol_ResizeGrip] = ImVec4( 0.12f, 0.12f, 0.14f, 0.95f );
colors[ImGuiCol_ResizeGripActive] = ImVec4( 0.12f, 0.12f, 0.14f, 0.95f );
colors[ImGuiCol_ResizeGripHovered] = ImVec4( 0.12f, 0.12f, 0.14f, 0.95f );
}
#endif
|