Finish implementing node element and add init_ui_ctx function

This commit is contained in:
2024-01-17 23:28:31 +00:00
parent fb1af03308
commit c5b263e948
2 changed files with 22 additions and 17 deletions

View File

@@ -35,16 +35,17 @@ struct ui_ctx {
u64 count;
i64 hovered;
i64 active;
i64 mouse_x;
i64 mouse_y;
i64 rel_x;
i64 rel_y;
i32 mouse_x;
i32 mouse_y;
i32 rel_x;
i32 rel_y;
bool mouse_down;
bool mouse_up;
const window_t *wnd;
ui_elem_t elements[MAX_UI_ELEMENTS];
};
void init_ui_ctx(ui_ctx_t *ctx);
void reset_ui_ctx(ui_ctx_t *ctx);
void handle_ui_events(const window_t *wnd, ui_ctx_t *ctx,
const SDL_Event *event);