diff options
| author | iamcheeseman <[email protected]> | 2026-05-21 21:53:59 -0400 |
|---|---|---|
| committer | iamcheeseman <[email protected]> | 2026-05-21 21:53:59 -0400 |
| commit | 130f8da1e3a923a28b8bea3ec2954eb95795daf1 (patch) | |
| tree | 15a07330d855238f8cfaa432c03e3db380c87ecf | |
| parent | 0bcad305bdc38c6c8009626fe31bb336e3374412 (diff) | |
add a second test window
| -rw-r--r-- | dc/dc.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -15,7 +15,8 @@ ty_Image img; ty_Font font = {}; -tyui_Id winid = 0; +tyui_Id winid1 = 0; +tyui_Id winid2 = 0; double last_frame = 0; @@ -65,7 +66,7 @@ void tick(void) double frame_time = ty_get_time() - last_frame; last_frame = ty_get_time(); - if (tyui_begin_window("Test Window", ty_recti(5, 5, 100, 120), &winid)) { + if (tyui_begin_window("Test Window", ty_recti(5, 5, 100, 120), &winid1)) { tyui_button("before"); tyui_push_layout((float[]){0.5, -1, 0}); @@ -90,6 +91,11 @@ void tick(void) tyui_end_window(); } + if (tyui_begin_window("2nd Window", ty_recti(110, 5, 100, 120), &winid2)) { + tyui_text("Test text"); + tyui_end_window(); + } + tyui_draw(); ty_Vec2i mouse_pos = ty_mouse_pos(); |
