6#include <unordered_map>
11 std::unordered_map<int, ImVec4> Colors;
14 float Alpha = 1.0f;
bool hasAlpha =
false;
15 float DisabledAlpha = 1.0f;
bool hasDisabledAlpha =
false;
16 ImVec2 WindowPadding;
bool hasWindowPadding =
false;
17 float WindowRounding = 0.0f;
bool hasWindowRounding =
false;
18 float WindowBorderSize = 1.0f;
bool hasWindowBorderSize =
false;
19 ImVec2 WindowMinSize;
bool hasWindowMinSize =
false;
20 ImVec2 WindowTitleAlign;
bool hasWindowTitleAlign =
false;
21 float ChildRounding = 0.0f;
bool hasChildRounding =
false;
22 float ChildBorderSize = 1.0f;
bool hasChildBorderSize =
false;
23 float PopupRounding = 0.0f;
bool hasPopupRounding =
false;
24 float PopupBorderSize = 1.0f;
bool hasPopupBorderSize =
false;
25 ImVec2 FramePadding;
bool hasFramePadding =
false;
26 float FrameRounding = 0.0f;
bool hasFrameRounding =
false;
27 float FrameBorderSize = 0.0f;
bool hasFrameBorderSize =
false;
28 ImVec2 ItemSpacing;
bool hasItemSpacing =
false;
29 ImVec2 ItemInnerSpacing;
bool hasItemInnerSpacing =
false;
30 ImVec2 CellPadding;
bool hasCellPadding =
false;
31 float IndentSpacing = 21.0f;
bool hasIndentSpacing =
false;
32 float ColumnsMinSpacing = 6.0f;
bool hasColumnsMinSpacing =
false;
33 float ScrollbarSize = 14.0f;
bool hasScrollbarSize =
false;
34 float ScrollbarRounding = 9.0f;
bool hasScrollbarRounding =
false;
35 float GrabMinSize = 10.0f;
bool hasGrabMinSize =
false;
36 float GrabRounding = 0.0f;
bool hasGrabRounding =
false;
37 float TabRounding = 4.0f;
bool hasTabRounding =
false;
38 float TabBorderSize = 0.0f;
bool hasTabBorderSize =
false;
39 ImVec2 ButtonTextAlign;
bool hasButtonTextAlign =
false;
40 ImVec2 SelectableTextAlign;
bool hasSelectableTextAlign =
false;
43 float CheckboxSize = 16.0f;
bool hasCheckboxSize =
false;
46 ImVec4 DockTabTextColor;
bool hasDockTabTextColor =
false;
49 ImVec4 DockSplitterColor;
bool hasDockSplitterColor =
false;
50 ImVec4 DockSplitterHoverColor;
bool hasDockSplitterHoverColor =
false;
51 ImVec4 DockTabBarBg;
bool hasDockTabBarBg =
false;
54 ImVec4 PanelAssetsBg;
bool hasPanelAssetsBg =
false;
55 ImVec4 PanelSceneBg;
bool hasPanelSceneBg =
false;
56 ImVec4 PanelPropertiesBg;
bool hasPanelPropertiesBg =
false;
57 ImVec4 PanelDebugLogBg;
bool hasPanelDebugLogBg =
false;
67namespace CssThemeParser
70 bool ParseFile(
const std::string& filePath, CssThemeData& outTheme);
73 bool ParseString(
const std::string& css, CssThemeData& outTheme);
76 void ApplyTheme(
const CssThemeData& themeData);
79 bool ParseHexColor(
const std::string& hex, ImVec4& outColor);
80 bool ParseRgbColor(
const std::string& rgb, ImVec4& outColor);
81 bool ParseRgbaColor(
const std::string& rgba, ImVec4& outColor);
82 float ParsePxValue(
const std::string& value);
85 const SelectorMapping* GetSelectorMappings();
86 int GetSelectorMappingCount();
89 bool GetPanelAssetsBg(ImVec4& outColor);
90 bool GetPanelSceneBg(ImVec4& outColor);
91 bool GetPanelPropertiesBg(ImVec4& outColor);
92 bool GetPanelDebugLogBg(ImVec4& outColor);
93 void SetPanelColors(
const CssThemeData& data);
94 void ClearPanelColors();