aboutsummaryrefslogtreecommitdiff
path: root/dc/dc.c
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-05-22 19:19:14 -0400
committeriamcheeseman <[email protected]>2026-05-22 19:19:14 -0400
commit77d193cdd127714ce4eab73d7a11a155655b7678 (patch)
tree7e8f8cee1495206c4df2fe3d62ef9841e7eb81f8 /dc/dc.c
parent2d5c6f38f73453e4b1185017ff01b02f095a5db0 (diff)
fix elements getting clipped with size <0
Diffstat (limited to 'dc/dc.c')
-rw-r--r--dc/dc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/dc/dc.c b/dc/dc.c
index 679d43a..aed4a7c 100644
--- a/dc/dc.c
+++ b/dc/dc.c
@@ -98,11 +98,13 @@ void tick(void)
tyui_slider_ex(0, 100, &value, true, TYUI_ALIGN_RIGHT);
tyui_blank_slider(0, 100, &value);
- tyui_push_layout((float[]){-50, -1, 0});
- tyui_button("abc");
- tyui_button("xyz");
- tyui_button("abc");
- tyui_button("xyz");
+ tyui_push_layout((float[]){50, -1, 0});
+ tyui_slider(0, 100, &value);
+ if (tyui_button("inc"))
+ value++;
+ tyui_slider(0, 100, &value);
+ if (tyui_button("dec"))
+ value--;
tyui_pop_layout();
tyui_end_window();