make/vs/testapp/main.c

branch
newapi
changeset 220
e377456302df
parent 219
527a66c0afb2
child 221
a82d9beaa94a
--- a/make/vs/testapp/main.c	Tue Oct 17 21:00:48 2023 +0200
+++ b/make/vs/testapp/main.c	Tue Oct 17 21:50:48 2023 +0200
@@ -46,6 +46,7 @@
     UiString* t3;
     UiList* list2;
     UiList* list3;
+    UiDouble* progress;
 } WindowData;
 
 static UiIcon* folder_icon;
@@ -58,6 +59,9 @@
     int64_t radio = wdata->radio->get(wdata->radio);
 
     printf("data: %s %d\n", data, is_checked);
+
+    double d = wdata->progress->get(wdata->progress);
+    wdata->progress->set(wdata->progress, d + 1);
 }
 
 void action_set_checkbox(UiEvent* event, void* data) {
@@ -150,6 +154,7 @@
     wdata->t1 = ui_string_new(obj->ctx, "t1");
     wdata->t2 = ui_string_new(obj->ctx, "t2");
     wdata->t3 = ui_string_new(obj->ctx, "t3");
+    wdata->progress = ui_double_new(obj->ctx, "progress");
 
     ui_list_append(wdata->list, "Hello");
     ui_list_append(wdata->list, "World");
@@ -262,6 +267,7 @@
             ui_newline(obj);
 
             ui_label(obj, .label = "Test Label");
+            ui_progressbar(obj, .value = wdata->progress, .colspan = 2);
             ui_newline(obj);
 
             ui_newline(obj);

mercurial