Reorder ui functions

This commit is contained in:
Abdelrahman Said 2024-02-25 20:33:04 +00:00
parent 7b7a913c46
commit 373e48216d

View File

@ -141,11 +141,6 @@ bool ui_node(const window *wnd, ui_ctx *ctx, rect rect,
return false;
}
internal u64 get_id(ui_ctx *ctx) {
// This will always keep the 0 slot empty
return ++(ctx->count);
}
bool ui_noodle(const window *wnd, ui_ctx *ctx, line ln, ui_elem_colours colours,
rect parent_node) {
if (ctx->count + 1 >= MAX_UI_ELEMENTS) {
@ -253,3 +248,8 @@ bool ui_noodle(const window *wnd, ui_ctx *ctx, line ln, ui_elem_colours colours,
return false;
}
internal u64 get_id(ui_ctx *ctx) {
// This will always keep the 0 slot empty
return ++(ctx->count);
}