[Examples/SDL3] Add thickness value to demo border objects.

This commit is contained in:
arnau.nau 2025-01-26 00:41:44 +01:00
parent 8c4be7ea70
commit d33896992f
No known key found for this signature in database
GPG Key ID: 88BBBBA8921839B2

View File

@ -48,13 +48,13 @@ static void Label(const Clay_String text, const int cornerRadius)
} }
} }
static void LabelBorder(const Clay_String text, const int cornerRadius) static void LabelBorder(const Clay_String text, const int cornerRadius, const int thickness)
{ {
CLAY( CLAY(
CLAY_LAYOUT({ CLAY_LAYOUT({
.padding = {8, 8} }), .padding = {16, 16, 8, 8 } }),
CLAY_BORDER_OUTSIDE_RADIUS( CLAY_BORDER_OUTSIDE_RADIUS(
2, thickness,
COLOR_BLUE, COLOR_BLUE,
cornerRadius) cornerRadius)
){ ){
@ -92,11 +92,12 @@ static Clay_RenderCommandArray Clay_CreateLayout()
.color = COLOR_LIGHT, .color = COLOR_LIGHT,
}) })
) { ) {
Label(CLAY_STRING("Rounded - Button 1"), 5); Label(CLAY_STRING("Rounded - Button 1"), 10);
Label(CLAY_STRING("Straight - Button 2") , 0); Label(CLAY_STRING("Straight - Button 2") , 0);
Label(CLAY_STRING("Rounded+ - Button 3") , 20); Label(CLAY_STRING("Rounded+ - Button 3") , 20);
LabelBorder(CLAY_STRING("Border - Button 4"), 0); LabelBorder(CLAY_STRING("Border - Button 4"), 0, 5);
LabelBorder(CLAY_STRING("RoundedBorder - Button 5"), 10); LabelBorder(CLAY_STRING("RoundedBorder - Button 5"), 10, 5);
LabelBorder(CLAY_STRING("RoundedBorder - Button 6"), 40, 15);
} }
return Clay_EndLayout(); return Clay_EndLayout();
} }