From 7d0abeea15d4de3243fdc69d902149ed5ede3310 Mon Sep 17 00:00:00 2001 From: luboslenco Date: Sat, 14 Sep 2024 17:48:30 +0200 Subject: [PATCH] Fix bool node button --- sources/iron_ui_nodes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/iron_ui_nodes.c b/sources/iron_ui_nodes.c index 243b2b77..eabd07ba 100644 --- a/sources/iron_ui_nodes.c +++ b/sources/iron_ui_nodes.c @@ -597,9 +597,9 @@ void ui_draw_node(ui_node_t *node, ui_node_canvas_t *canvas) { current->_w = w; ui_handle_t *h = ui_nest(nhandle, buti); if (h->init) { - h->selected = ((uint8_t *)but->default_value->buffer)[0]; + h->selected = ((float *)but->default_value->buffer)[0]; } - ((uint8_t *)but->default_value->buffer)[0] = ui_check(h, ui_tr(but->name), ""); + ((float *)but->default_value->buffer)[0] = ui_check(h, ui_tr(but->name), ""); } else if (strcmp(but->type, "CUSTOM") == 0) { // Calls external function for custom button drawing ny += lineh;