Added more menus to phone version

This commit is contained in:
Yousef Khadadeh 2026-05-13 14:31:35 +03:00
parent 1b99c64c1b
commit 4774f1ee94
22 changed files with 633 additions and 306 deletions

View file

@ -31,9 +31,10 @@ void CheckBox::layout(const Clay_ElementId& id, const std::function<bool()>& isT
this->isTicked = isTicked;
this->onClick = onClick;
float size = gui.io.isTouchDevice ? 25 : 15;
CLAY(id, {
.layout = {
.sizing = {.width = CLAY_SIZING_FIXED(15), .height = CLAY_SIZING_FIXED(15)}
.sizing = {.width = CLAY_SIZING_FIXED(size), .height = CLAY_SIZING_FIXED(size)}
},
.custom = { .customData = this }
}) {}

View file

@ -43,9 +43,10 @@ template <typename T> class NumberSlider : public Element {
dd.maxData = maxData;
this->config = config;
float height = gui.io.isTouchDevice ? 25 : 10;
CLAY(id, {
.layout = {
.sizing = {.width = CLAY_SIZING_GROW(100), .height = CLAY_SIZING_FIXED(10)}
.sizing = {.width = CLAY_SIZING_GROW(100), .height = CLAY_SIZING_FIXED(height)}
},
.custom = { .customData = this }
}) {

View file

@ -29,9 +29,10 @@ void RadioButton::layout(const Clay_ElementId& id, const std::function<bool()>&
this->onClick = onClick;
this->isTicked = isTicked;
float size = gui.io.isTouchDevice ? 25 : 20;
CLAY(id, {
.layout = {
.sizing = {.width = CLAY_SIZING_FIXED(20), .height = CLAY_SIZING_FIXED(20)}
.sizing = {.width = CLAY_SIZING_FIXED(size), .height = CLAY_SIZING_FIXED(size)}
},
.custom = { .customData = this }
}) {}