From 2d5c6f38f73453e4b1185017ff01b02f095a5db0 Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Fri, 22 May 2026 19:09:14 -0400 Subject: fix negative column widths --- dc/dc.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'dc/dc.c') diff --git a/dc/dc.c b/dc/dc.c index 97be641..679d43a 100644 --- a/dc/dc.c +++ b/dc/dc.c @@ -69,7 +69,7 @@ void tick(void) if (tyui_begin_window("Test Window", ty_recti(5, 5, 100, 120), &winid1)) { tyui_button("before"); - tyui_push_layout((float[]){0.5, -1, 0}); + tyui_push_layout((float[]){-50, -1, 0}); tyui_push_layout((float[]){-1, 0}); tyui_text_ex(TYUI_ALIGN_CENTER, "Buttons"); tyui_button("test1"); @@ -97,6 +97,14 @@ void tick(void) tyui_slider_ex(0, 100, &value, true, TYUI_ALIGN_LEFT); 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_pop_layout(); + tyui_end_window(); } @@ -161,7 +169,7 @@ int main(void) tick(); ty_free_temp_allocs(); - // ty_sleep(1000 / hints.ticrate); + ty_sleep(1000 / hints.ticrate); } ty_free_image(img); -- cgit v1.3-2-g0d8e