feat: added border to TextButton
This commit is contained in:
parent
461a233eb2
commit
e3638788e5
|
|
@ -2,13 +2,15 @@
|
|||
#include "style.h"
|
||||
|
||||
void TextButton(Clay_String text, Clay_Color color, OnHoveredFn onHovered, intptr_t onHoveredData) {
|
||||
Clay_Color hovered = ToHoveredColor(color);
|
||||
CLAY_AUTO_ID({
|
||||
.layout = {
|
||||
.childAlignment = { CLAY_ALIGN_X_CENTER, CLAY_ALIGN_Y_CENTER },
|
||||
.padding = buttonPadding,
|
||||
},
|
||||
.cornerRadius = buttonRadii,
|
||||
.backgroundColor = Clay_Hovered() ? ToHoveredColor(color) : color,
|
||||
.backgroundColor = Clay_Hovered() ? hovered : color,
|
||||
.border = { ToHoveredColor(Clay_Hovered() ? hovered : color), CLAY_BORDER_ALL(1) }
|
||||
}) {
|
||||
CLAY_TEXT(text, CLAY_TEXT_CONFIG({
|
||||
.BODY(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue