Labels¶
Display text in your GUI.
Creating a Label¶
Updating Label Text¶
Example¶
gui_init("com.example.label");
let window = gui_window("Label Demo", 300, 200);
let box = gui_box("vertical", 10);
let label = gui_label("Counter: 0");
let button = gui_button("Increment");
let count = 0;
fn increment() {
count = count + 1;
gui_set_text(label, "Counter: #{count}");
}
gui_on(button, "clicked", "increment");
gui_add(box, label);
gui_add(box, button);
gui_add(window, box);
gui_run();