Reset noodle to default position if not connected to another node

This commit is contained in:
2024-02-25 00:46:02 +00:00
parent a86b025f7d
commit 050bb355d0
2 changed files with 34 additions and 13 deletions

View File

@@ -20,6 +20,7 @@ typedef struct ui_ctx ui_ctx;
enum ui_elem_type {
UI_ELEM_NODE,
UI_ELEM_NOODLE,
UI_ELEM_BUTTON,
COUNT_UI_ELEM,
@@ -55,6 +56,7 @@ struct ui_ctx {
bool mouse_down;
bool mouse_up;
const window *wnd;
ui_elem elements[MAX_UI_ELEMENTS];
};
void init_ui_ctx(ui_ctx *ctx);