diff --git a/src/application.cpp b/src/application.cpp index f722afe..f8b3743 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -73,7 +73,7 @@ static void DebugInfoLegend() { .border = { {255, 0, 255, 255 }, CLAY_BORDER_OUTSIDE(3) } }); elements::Body(CLAY_STRING("Underpopulated"), { - .textColor = style::TextColors(0) + .textColor = style::TextColor(0) }); } CLAY_AUTO_ID({ @@ -88,7 +88,7 @@ static void DebugInfoLegend() { .border = { {255, 0, 0, 255 }, CLAY_BORDER_OUTSIDE(3) } }); elements::Body(CLAY_STRING("Overpopulated"), { - .textColor = style::TextColors(0) + .textColor = style::TextColor(0) }); } CLAY_AUTO_ID({ @@ -103,11 +103,11 @@ static void DebugInfoLegend() { .border = { {0, 255, 0, 255 }, CLAY_BORDER_OUTSIDE(3) } }); elements::Body(CLAY_STRING("Born"), { - .textColor = style::TextColors(0) + .textColor = style::TextColor(0) }); } elements::Body(CLAY_STRING("Warning: Drawing simulation changes\ngreatly lowers performance"), { - .textColor = style::TextColors(3) + .textColor = style::TextColor(3) }); } } diff --git a/src/elements.cpp b/src/elements.cpp index 8d55a46..a962cc0 100644 --- a/src/elements.cpp +++ b/src/elements.cpp @@ -18,7 +18,7 @@ void TextButton(Clay_String text, Clay_Color color, OnHoveredFn onHovered, intpt }) { Clay_OnHover(onHovered, onHoveredData); elements::Body(text, { - .textColor = style::TextColors(0), + .textColor = style::TextColor(0), .textAlignment = CLAY_TEXT_ALIGN_CENTER, }); } @@ -62,7 +62,7 @@ void Toggle(Clay_String label, Clay_Color selected, bool &state) { }, }) { } Body(label, { - .textColor = style::TextColors(0) + .textColor = style::TextColor(0) }); } } diff --git a/src/style.cpp b/src/style.cpp index 6816639..2bb2332 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -57,7 +57,7 @@ Clay_Color PanelBorder(size_t idx) { }; } -Clay_Color TextColors(size_t idx) { +Clay_Color TextColor(size_t idx) { return { 255*textColorsP[idx], 255*textColorsP[idx], diff --git a/src/style.h b/src/style.h index 07a9707..9ba6024 100644 --- a/src/style.h +++ b/src/style.h @@ -33,6 +33,10 @@ constexpr Clay_Padding panelPadding = { Clay_ElementDeclaration ListContainer(size_t depth, Clay_ElementDeclaration baseCfg); Clay_ElementDeclaration PanelContainer(size_t depth, Clay_ElementDeclaration baseCfg); Clay_ElementDeclaration LeftPanelContainer(size_t depth, Clay_ElementDeclaration baseCfg); +Clay_ElementDeclaration RightPanelContainer(size_t depth, Clay_ElementDeclaration baseCfg); +Clay_Color PanelBackground(size_t idx); +Clay_Color PanelBorder(size_t idx); +Clay_ElementDeclaration Window(); //////////////////////////////////// // TEXT STYLE @@ -49,6 +53,8 @@ constexpr uint16_t headerSizes[] = { 28, 16 }; +Clay_Color TextColor(size_t idx); + //////////////////////////////////// // BUTTONS //////////////////////////////////// @@ -71,6 +77,8 @@ constexpr Clay_CornerRadius buttonRadii = { 3, 3, 3, 3 }; +Clay_Color ToHoveredColor(Clay_Color color); + //////////////////////////////////// // COMPILATIONS // | Functions and expressions that combine styling data from the settings above. @@ -91,14 +99,6 @@ constexpr Clay_Color transparent{ 255, 255, 255, 0 }; constexpr Clay_Color black{ 0, 0, 0, 255 }; constexpr Clay_Color white{ 255, 255, 255, 255 }; } - -Clay_Color PanelBackground(size_t idx); -Clay_Color PanelBorder(size_t idx); -Clay_Color TextColors(size_t idx); -Clay_Color WindowBackground(); -Clay_ElementDeclaration Window(); -Clay_Color ToHoveredColor(Clay_Color color); - } #endif // !STYLE_H