Update code for detecting mouse hovering nodes

This commit is contained in:
Abdelrahman Said 2024-01-15 19:12:21 +00:00
parent fd6e237647
commit dacc3be970

View File

@ -81,7 +81,7 @@ i32 run_main_loop(void) {
} else {
comp.node_hovered = -1;
for (u64 i = 0; i < comp.count; ++i) {
for (u64 i = comp.count - 1; i >= 0; --i) {
node_t *node = &(comp.nodes[i]);
if (aabb(node, comp.mouse_x, comp.mouse_y)) {