diff --git a/gui.c b/gui.c index cea74d3..e0f6375 100644 --- a/gui.c +++ b/gui.c @@ -4239,7 +4239,7 @@ gui_panel_tree_node(struct gui_tree *tree, enum gui_tree_node_symbol symbol, if (gui_input_clicked(i, &sym)) { if (*state & GUI_NODE_ACTIVE) *state &= ~(gui_flags)GUI_NODE_ACTIVE; - else *state |= (gui_flags)GUI_NODE_ACTIVE; + else *state |= GUI_NODE_ACTIVE; } heading = (*state & GUI_NODE_ACTIVE) ? GUI_DOWN : GUI_RIGHT; gui_triangle_from_direction(points, sym.x, sym.y, sym.w, sym.h, 0, 0, heading); @@ -4254,7 +4254,7 @@ gui_panel_tree_node(struct gui_tree *tree, enum gui_tree_node_symbol symbol, if (gui_input_clicked(i, &label)) { if (*state & GUI_NODE_SELECTED) *state &= ~(gui_flags)GUI_NODE_SELECTED; - else *state |= (gui_flags)GUI_NODE_SELECTED; + else *state |= GUI_NODE_SELECTED; } { diff --git a/gui.h b/gui.h index 982d314..2fa13ef 100644 --- a/gui.h +++ b/gui.h @@ -1743,9 +1743,11 @@ struct gui_panel_layout { /* command draw call output command buffer */ }; -#define GUI_NODE_ACTIVE 0x01 -#define GUI_NODE_SELECTED 0x02 -typedef gui_flag gui_tree_node_state; +enum gui_tree_nodes_states { + GUI_NODE_ACTIVE = 0x01, + GUI_NODE_SELECTED = 0x02 +}; +typedef gui_flags gui_tree_node_state; enum gui_tree_node_operation { GUI_NODE_NOP,