Compare commits
No commits in common. "4c9cafdff5c798e0153abe24da8799858d3c76ed" and "2cd5a953c94097cf4559002093bdb2de1568eec4" have entirely different histories.
4c9cafdff5
...
2cd5a953c9
|
@ -11,7 +11,7 @@ void DiceLogContainer() {
|
||||||
.sizing = layoutExpand,
|
.sizing = layoutExpand,
|
||||||
.padding = CLAY_PADDING_ALL(16),
|
.padding = CLAY_PADDING_ALL(16),
|
||||||
},
|
},
|
||||||
.CONTAINER(0),
|
.INNER_CONTAINER(0),
|
||||||
}) {}
|
}) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ void InitiativeListContainer() {
|
||||||
.sizing = layoutExpand,
|
.sizing = layoutExpand,
|
||||||
.padding = CLAY_PADDING_ALL(16),
|
.padding = CLAY_PADDING_ALL(16),
|
||||||
},
|
},
|
||||||
.CONTAINER(0),
|
.INNER_CONTAINER(0),
|
||||||
}) {}
|
}) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
15
src/dice.c
15
src/dice.c
|
@ -26,8 +26,7 @@ size_t add_die_to_active(enum die_type die) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void remove_die_from_active(size_t index) {
|
void remove_die_from_active(size_t index) {
|
||||||
memcpy(active_dice_set + index, active_dice_set + index + 1, MAX_ACTIVE_DICE - index - 1);
|
memmove(active_dice_set + index + 1, active_dice_set + index, MAX_ACTIVE_DICE - index - 1);
|
||||||
--current_active_count;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct roll_result_type roll_active_dice_set(enum die_type die) {
|
struct roll_result_type roll_active_dice_set(enum die_type die) {
|
||||||
|
@ -43,15 +42,3 @@ struct roll_result_type roll_active_dice_set(enum die_type die) {
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
Clay_String die_to_str(enum die_type die) {
|
|
||||||
switch (die) {
|
|
||||||
case COIN: return CLAY_STRING("C");
|
|
||||||
case D4: return CLAY_STRING("4");
|
|
||||||
case D6: return CLAY_STRING("6");
|
|
||||||
case D8: return CLAY_STRING("8");
|
|
||||||
case D10: return CLAY_STRING("10");
|
|
||||||
case D12: return CLAY_STRING("12");
|
|
||||||
case D20: return CLAY_STRING("20");
|
|
||||||
case D100: return CLAY_STRING("100");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,17 +1,15 @@
|
||||||
#ifndef DICE_H
|
#ifndef DICE_H
|
||||||
#define DICE_H
|
#define DICE_H
|
||||||
|
|
||||||
#include "renderer/clay_renderer_SDL3.h"
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#ifndef MAX_ACTIVE_DICE
|
#ifndef MAX_ACTIVE_DICE
|
||||||
#define MAX_ACTIVE_DICE 20
|
#define MAX_ACTIVE_DICE 5
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum die_type {
|
enum die_type {
|
||||||
COIN = 2,
|
COIN = 2,
|
||||||
D4 = 4,
|
D4 = 4,
|
||||||
D6 = 6,
|
|
||||||
D8 = 8,
|
D8 = 8,
|
||||||
D10 = 10,
|
D10 = 10,
|
||||||
D12 = 12,
|
D12 = 12,
|
||||||
|
@ -32,6 +30,4 @@ extern size_t add_die_to_active(enum die_type die);
|
||||||
extern void remove_die_from_active(size_t index);
|
extern void remove_die_from_active(size_t index);
|
||||||
extern struct roll_result_type roll_active_dice_set(enum die_type die);
|
extern struct roll_result_type roll_active_dice_set(enum die_type die);
|
||||||
|
|
||||||
extern Clay_String die_to_str(enum die_type die);
|
|
||||||
|
|
||||||
#endif // !DICE_H
|
#endif // !DICE_H
|
||||||
|
|
|
@ -1,126 +1,38 @@
|
||||||
#include "dice_container.h"
|
#include "dice_container.h"
|
||||||
#include <SDL3/SDL_mouse.h>
|
|
||||||
#include <clay/clay.h>
|
#include <clay/clay.h>
|
||||||
#include <stdint.h>
|
|
||||||
#include "style.h"
|
#include "style.h"
|
||||||
#include "dice.h"
|
|
||||||
|
|
||||||
static
|
|
||||||
void HandleAddDieButtonInteraction(Clay_ElementId element, Clay_PointerData pointer, intptr_t die) {
|
|
||||||
if (pointer.state == CLAY_POINTER_DATA_PRESSED_THIS_FRAME) {
|
|
||||||
add_die_to_active((enum die_type)die);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline
|
|
||||||
void AddDieButton(enum die_type die) {
|
|
||||||
CLAY(CLAY_IDI("AddDieButton", die), {
|
|
||||||
.layout = {
|
|
||||||
.sizing = { CLAY_SIZING_FIXED(100), CLAY_SIZING_FIXED(100) },
|
|
||||||
.childAlignment = { CLAY_ALIGN_X_CENTER, CLAY_ALIGN_Y_CENTER },
|
|
||||||
},
|
|
||||||
.backgroundColor = DieButtonColor(die, Clay_Hovered()),
|
|
||||||
}) {
|
|
||||||
Clay_OnHover(&HandleAddDieButtonInteraction, die);
|
|
||||||
CLAY_TEXT(die_to_str(die), CLAY_TEXT_CONFIG({
|
|
||||||
.textColor = TextColors(0),
|
|
||||||
.H(2),
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
void DiceSelectorContainer() {
|
void DiceSelectorContainer() {
|
||||||
CLAY(CLAY_ID("DiceSelector"), {
|
CLAY(CLAY_ID("DiceSelector"), {
|
||||||
.CONTAINER(0),
|
|
||||||
.layout = {
|
|
||||||
.sizing = { CLAY_SIZING_FIT(), CLAY_SIZING_GROW() },
|
|
||||||
.childAlignment = { CLAY_ALIGN_X_CENTER, CLAY_ALIGN_Y_CENTER },
|
|
||||||
},
|
|
||||||
}) {
|
|
||||||
CLAY(CLAY_ID("DiceSelectorInner"), {
|
|
||||||
.layout = {
|
.layout = {
|
||||||
.layoutDirection = CLAY_TOP_TO_BOTTOM,
|
.layoutDirection = CLAY_TOP_TO_BOTTOM,
|
||||||
.childGap = paragraphGap,
|
.sizing = { CLAY_SIZING_PERCENT(0.15), CLAY_SIZING_GROW(0) },
|
||||||
.childAlignment = { CLAY_ALIGN_X_CENTER, CLAY_ALIGN_Y_CENTER },
|
|
||||||
.sizing = { CLAY_SIZING_FIT(), CLAY_SIZING_FIT() },
|
|
||||||
.padding = containerPadding,
|
.padding = containerPadding,
|
||||||
|
.childGap = paragraphGap,
|
||||||
},
|
},
|
||||||
.clip = {
|
.INNER_CONTAINER(0),
|
||||||
false, true, Clay_GetScrollOffset(),
|
}) { }
|
||||||
},
|
|
||||||
}) {
|
|
||||||
AddDieButton(COIN);
|
|
||||||
AddDieButton(D4);
|
|
||||||
AddDieButton(D6);
|
|
||||||
AddDieButton(D8);
|
|
||||||
AddDieButton(D10);
|
|
||||||
AddDieButton(D12);
|
|
||||||
AddDieButton(D20);
|
|
||||||
AddDieButton(D100);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
void HandleRemoveDieButtonInteraction(Clay_ElementId element, Clay_PointerData pointer, intptr_t index) {
|
|
||||||
if (pointer.state == CLAY_POINTER_DATA_PRESSED_THIS_FRAME) {
|
|
||||||
remove_die_from_active(index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline
|
|
||||||
void RemoveDieButton(enum die_type die, int index) {
|
|
||||||
CLAY(CLAY_IDI("RemoveDieButton", index), {
|
|
||||||
.layout = {
|
|
||||||
.sizing = { CLAY_SIZING_FIXED(200), CLAY_SIZING_FIXED(200) },
|
|
||||||
.childAlignment = { CLAY_ALIGN_X_CENTER, CLAY_ALIGN_Y_CENTER },
|
|
||||||
},
|
|
||||||
.backgroundColor = DieButtonColor(die, Clay_Hovered()),
|
|
||||||
}) {
|
|
||||||
Clay_OnHover(&HandleRemoveDieButtonInteraction, index);
|
|
||||||
CLAY_TEXT(die_to_str(die), CLAY_TEXT_CONFIG({
|
|
||||||
.H(1),
|
|
||||||
.textColor = TextColors(0)
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
void ActiveDiceContainer() {
|
void ActiveDiceContainer() {
|
||||||
CLAY(CLAY_ID("ActiveDice"), {
|
CLAY(CLAY_ID("ActiveDice"), {
|
||||||
.layout = {
|
.layout = {
|
||||||
.sizing = { CLAY_SIZING_GROW(), CLAY_SIZING_GROW() },
|
.layoutDirection = CLAY_TOP_TO_BOTTOM,
|
||||||
|
.sizing = { CLAY_SIZING_GROW(0), CLAY_SIZING_GROW(0) },
|
||||||
|
.padding = containerPadding,
|
||||||
|
.childGap = paragraphGap,
|
||||||
},
|
},
|
||||||
.clip = {
|
.INNER_CONTAINER(0),
|
||||||
true, true,
|
}) { }
|
||||||
{ Clay_GetScrollOffset().x, 0 },
|
|
||||||
},
|
|
||||||
.CONTAINER(0),
|
|
||||||
}) {
|
|
||||||
CLAY(CLAY_ID("ActiveDiceInner"), {
|
|
||||||
.layout = {
|
|
||||||
.sizing = { CLAY_SIZING_GROW(), CLAY_SIZING_GROW() },
|
|
||||||
.layoutDirection = CLAY_LEFT_TO_RIGHT,
|
|
||||||
.childAlignment = { CLAY_ALIGN_X_CENTER, CLAY_ALIGN_Y_CENTER },
|
|
||||||
.childGap = 16,
|
|
||||||
.padding = { 100, 100, 0, 0 },
|
|
||||||
},
|
|
||||||
}) {
|
|
||||||
size_t dice_count = 0;
|
|
||||||
enum die_type const *dice = get_active_dice_set(&dice_count);
|
|
||||||
for (size_t i = 0; i < dice_count; ++i) {
|
|
||||||
RemoveDieButton(dice[i], i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiceContainer() {
|
void DiceContainer() {
|
||||||
CLAY(CLAY_ID("DiceContainer"), {
|
CLAY(CLAY_ID("DiceContainer"), {
|
||||||
.layout = {
|
.layout = {
|
||||||
.layoutDirection = CLAY_LEFT_TO_RIGHT,
|
.layoutDirection = CLAY_LEFT_TO_RIGHT,
|
||||||
.sizing = { CLAY_SIZING_GROW(), CLAY_SIZING_PERCENT(0.4) },
|
.sizing = { CLAY_SIZING_GROW(0), CLAY_SIZING_PERCENT(0.4) },
|
||||||
.childGap = containerGap
|
.childGap = containerGap
|
||||||
},
|
},
|
||||||
}) {
|
}) {
|
||||||
|
|
38
src/main.c
38
src/main.c
|
@ -1,5 +1,4 @@
|
||||||
#include <SDL3/SDL_hints.h>
|
#include <SDL3/SDL_hints.h>
|
||||||
#include <SDL3/SDL_keycode.h>
|
|
||||||
#include <SDL3/SDL_oldnames.h>
|
#include <SDL3/SDL_oldnames.h>
|
||||||
#include <clay/clay.h>
|
#include <clay/clay.h>
|
||||||
#include "renderer/clay_renderer_SDL3.h"
|
#include "renderer/clay_renderer_SDL3.h"
|
||||||
|
@ -49,7 +48,7 @@ void LogOutputResolution() {
|
||||||
SDL_Log("output size: %i, %d", w, h);
|
SDL_Log("output size: %i, %d", w, h);
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static inline
|
||||||
Clay_Dimensions MeasureText(Clay_StringSlice text, Clay_TextElementConfig *config, void *userData) {
|
Clay_Dimensions MeasureText(Clay_StringSlice text, Clay_TextElementConfig *config, void *userData) {
|
||||||
TTF_Font **fonts = userData;
|
TTF_Font **fonts = userData;
|
||||||
TTF_Font *font = fonts[config->fontId];
|
TTF_Font *font = fonts[config->fontId];
|
||||||
|
@ -58,7 +57,10 @@ Clay_Dimensions MeasureText(Clay_StringSlice text, Clay_TextElementConfig *confi
|
||||||
if (!TTF_GetStringSize(font, text.chars, text.length, &width, &height)) {
|
if (!TTF_GetStringSize(font, text.chars, text.length, &width, &height)) {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_ERROR, "MeasureText failed to measure text %s", SDL_GetError());
|
SDL_LogError(SDL_LOG_CATEGORY_ERROR, "MeasureText failed to measure text %s", SDL_GetError());
|
||||||
}
|
}
|
||||||
return (Clay_Dimensions) { width, height };
|
return (Clay_Dimensions) {
|
||||||
|
.width = text.length * config->fontSize,
|
||||||
|
.height = config->fontSize
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
|
@ -130,14 +132,7 @@ int main(int argc, char *argv[]) {
|
||||||
.textEngine = textEngine,
|
.textEngine = textEngine,
|
||||||
};
|
};
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
uint64_t startFrameTime = SDL_GetTicksNS();
|
|
||||||
double deltaTime = 0.0;
|
|
||||||
bool mouseButtonDown = false;
|
|
||||||
bool shiftDown = false;
|
|
||||||
while (running) {
|
while (running) {
|
||||||
deltaTime = SDL_GetTicksNS() - startFrameTime;
|
|
||||||
startFrameTime = SDL_GetTicksNS();
|
|
||||||
Clay_Vector2 scrollMotion = { 0, 0 };
|
|
||||||
while (SDL_PollEvent(&event)) {
|
while (SDL_PollEvent(&event)) {
|
||||||
HandleEvent(event);
|
HandleEvent(event);
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
|
@ -152,32 +147,17 @@ int main(int argc, char *argv[]) {
|
||||||
LogOutputResolution();
|
LogOutputResolution();
|
||||||
break;
|
break;
|
||||||
case SDL_EVENT_MOUSE_WHEEL:
|
case SDL_EVENT_MOUSE_WHEEL:
|
||||||
if (shiftDown) {
|
Clay_UpdateScrollContainers(true, (Clay_Vector2){ event.wheel.x, event.wheel.y }, 0.01f);
|
||||||
scrollMotion = (Clay_Vector2) { event.wheel.y * 2.f, event.wheel.x * 2.f };
|
|
||||||
} else {
|
|
||||||
scrollMotion = (Clay_Vector2) { event.wheel.x * 2.f, event.wheel.y * 2.f };
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case SDL_EVENT_MOUSE_MOTION:
|
case SDL_EVENT_MOUSE_MOTION:
|
||||||
Clay_SetPointerState((Clay_Vector2) { event.motion.x, event.motion.y }, mouseButtonDown);
|
Clay_SetPointerState((Clay_Vector2) { event.motion.x, event.motion.y }, event.motion.state & SDL_BUTTON_LEFT);
|
||||||
break;
|
break;
|
||||||
case SDL_EVENT_MOUSE_BUTTON_DOWN:
|
case SDL_EVENT_MOUSE_BUTTON_DOWN:
|
||||||
case SDL_EVENT_MOUSE_BUTTON_UP:
|
Clay_SetPointerState((Clay_Vector2) { event.button.x, event.button.y }, event.button.button == SDL_BUTTON_LEFT);
|
||||||
if (event.button.button == SDL_BUTTON_LEFT) {
|
default:
|
||||||
mouseButtonDown = event.button.down;
|
|
||||||
Clay_SetPointerState((Clay_Vector2) { event.button.x, event.button.y }, mouseButtonDown);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case SDL_EVENT_KEY_DOWN:
|
|
||||||
case SDL_EVENT_KEY_UP:
|
|
||||||
if (event.key.key == SDLK_LSHIFT || event.key.key == SDLK_RSHIFT) {
|
|
||||||
shiftDown = event.key.down;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default: break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Clay_UpdateScrollContainers(true, scrollMotion, deltaTime);
|
|
||||||
SDL_SetRenderDrawColor(renderer, 10, 10, 10, 255);
|
SDL_SetRenderDrawColor(renderer, 10, 10, 10, 255);
|
||||||
SDL_RenderClear(renderer);
|
SDL_RenderClear(renderer);
|
||||||
Clay_RenderCommandArray array = RenderApplication();
|
Clay_RenderCommandArray array = RenderApplication();
|
||||||
|
|
27
src/style.c
27
src/style.c
|
@ -1,7 +1,5 @@
|
||||||
#include "style.h"
|
#include "style.h"
|
||||||
#include "application.h"
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "dice.h"
|
|
||||||
|
|
||||||
Clay_Color ContainerBackgrounds(size_t idx) {
|
Clay_Color ContainerBackgrounds(size_t idx) {
|
||||||
return (Clay_Color) {
|
return (Clay_Color) {
|
||||||
|
@ -45,28 +43,3 @@ Clay_ElementDeclaration WindowStyle() {
|
||||||
.backgroundColor = WindowBackground()
|
.backgroundColor = WindowBackground()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
Clay_Color DieColor(enum die_type die) {
|
|
||||||
switch(die) {
|
|
||||||
case COIN: return (Clay_Color) { 230, 184, 48, 255 };
|
|
||||||
case D4: return (Clay_Color) { 177, 56, 52, 255 };
|
|
||||||
case D6: return (Clay_Color) { 115, 177, 52, 255 };
|
|
||||||
case D8: return (Clay_Color) { 52, 177, 125, 255 };
|
|
||||||
case D10: return (Clay_Color) { 52, 177, 176, 255 };
|
|
||||||
case D12: return (Clay_Color) { 52, 93, 177, 255 };
|
|
||||||
case D20: return (Clay_Color) { 177, 52, 140, 255 };
|
|
||||||
case D100: return (Clay_Color) { 95, 52, 177, 255 };
|
|
||||||
default: return (Clay_Color) { 0, 0, 0, 255 };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Clay_Color DieButtonColor(enum die_type die, bool selected) {
|
|
||||||
Clay_Color color = DieColor(die);
|
|
||||||
if (selected) {
|
|
||||||
float avg = (color.r + color.g + color.b) / 3.f;
|
|
||||||
color.r = (color.r - avg) * 0.8f + avg - 30;
|
|
||||||
color.g = (color.g - avg) * 0.8f + avg - 30;
|
|
||||||
color.b = (color.b - avg) * 0.8f + avg - 30;
|
|
||||||
}
|
|
||||||
return color;
|
|
||||||
}
|
|
||||||
|
|
49
src/style.h
49
src/style.h
|
@ -2,23 +2,15 @@
|
||||||
#define STYLE_H
|
#define STYLE_H
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "dice.h"
|
|
||||||
#include <clay/clay.h>
|
#include <clay/clay.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
////////////////////////////////////
|
|
||||||
// WINDOW STYLE
|
|
||||||
////////////////////////////////////
|
|
||||||
|
|
||||||
constexpr uint16_t windowPadding = 10;
|
|
||||||
constexpr float windowBackground = 0.15f;
|
|
||||||
|
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
// CONTAINER STYLE
|
// CONTAINER STYLE
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
|
|
||||||
constexpr uint16_t containerGap = 10;
|
constexpr uint16_t containerGap = 10;
|
||||||
constexpr double defaultRadius = 5.0;
|
constexpr double defaultRadius = 5.;
|
||||||
|
|
||||||
constexpr float containerBackgrounds[] = {
|
constexpr float containerBackgrounds[] = {
|
||||||
.2f,
|
.2f,
|
||||||
|
@ -32,15 +24,23 @@ constexpr float containerBorders[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
constexpr Clay_Padding containerPadding = {
|
constexpr Clay_Padding containerPadding = {
|
||||||
24, 24,
|
32, 32,
|
||||||
24, 24,
|
16, 16
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CONTAINER(depth_)\
|
#define INNER_CONTAINER(depth_)\
|
||||||
backgroundColor = ContainerBackgrounds(depth_),\
|
backgroundColor = ContainerBackgrounds(depth_),\
|
||||||
.border = { ContainerBorders(depth_), CLAY_BORDER_ALL(2) },\
|
.border = { ContainerBorders(depth_), CLAY_BORDER_ALL(2) },\
|
||||||
.cornerRadius = defaultRadiusAll
|
.cornerRadius = defaultRadiusAll
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////
|
||||||
|
// WINDOW STYLE
|
||||||
|
////////////////////////////////////
|
||||||
|
|
||||||
|
constexpr uint16_t windowPadding = containerGap;
|
||||||
|
constexpr float windowBackground = .18f;
|
||||||
|
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
// TEXT STYLE
|
// TEXT STYLE
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
|
@ -58,19 +58,30 @@ constexpr uint16_t headerSizes[] = {
|
||||||
28, 16
|
28, 16
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define TEXT_STYLE(color_)\
|
||||||
|
textColor = TextColors(color_)
|
||||||
|
|
||||||
#define BODY(color_)\
|
#define BODY(color_)\
|
||||||
fontId = FONT_DEFAULT,\
|
fontId = FONT_DEFAULT,\
|
||||||
.fontSize = baseFontSize
|
.fontSize = baseFontSize,\
|
||||||
|
.TEXT_STYLE(color_)
|
||||||
|
|
||||||
#define H(level_)\
|
#define H(level_, color_)\
|
||||||
fontId = FONT_BOLD,\
|
fontId = FONT_BOLD,\
|
||||||
.fontSize = headerSizes[(level_)-1]
|
.fontSize = headerSizes[(level_)-1],\
|
||||||
|
.TEXT_STYLE(color_)
|
||||||
|
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
// COMPILATIONS
|
// COMPILATIONS
|
||||||
// | Functions and expressions that combine styling data from the settings above.
|
// | Functions and expressions that combine styling data from the settings above.
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
|
|
||||||
|
extern Clay_Color ContainerBackgrounds(size_t idx);
|
||||||
|
extern Clay_Color ContainerBorders(size_t idx);
|
||||||
|
extern Clay_Color TextColors(size_t idx);
|
||||||
|
extern Clay_Color WindowBackground();
|
||||||
|
extern Clay_ElementDeclaration WindowStyle();
|
||||||
|
|
||||||
constexpr Clay_Sizing layoutExpand = {
|
constexpr Clay_Sizing layoutExpand = {
|
||||||
.width = CLAY_SIZING_GROW(0),
|
.width = CLAY_SIZING_GROW(0),
|
||||||
.height = CLAY_SIZING_GROW(0)
|
.height = CLAY_SIZING_GROW(0)
|
||||||
|
@ -81,12 +92,4 @@ constexpr Clay_CornerRadius defaultRadiusAll = {
|
||||||
defaultRadius, defaultRadius
|
defaultRadius, defaultRadius
|
||||||
};
|
};
|
||||||
|
|
||||||
extern Clay_Color ContainerBackgrounds(size_t idx);
|
|
||||||
extern Clay_Color ContainerBorders(size_t idx);
|
|
||||||
extern Clay_Color TextColors(size_t idx);
|
|
||||||
extern Clay_Color WindowBackground();
|
|
||||||
extern Clay_ElementDeclaration WindowStyle();
|
|
||||||
extern Clay_Color DieColor(enum die_type die);
|
|
||||||
extern Clay_Color DieButtonColor(enum die_type die, bool selected);
|
|
||||||
|
|
||||||
#endif // !STYLE_H
|
#endif // !STYLE_H
|
||||||
|
|
Loading…
Reference in a new issue