Misc changes

* Made refactor rende procedures to specify dependencies instead of directly grabbing from state singleton
This commit is contained in:
2024-06-26 06:03:00 -04:00
parent 413f544e9c
commit 9d0cc125a9
12 changed files with 567 additions and 625 deletions

View File

@ -515,4 +515,4 @@ ui_view_bounds :: #force_inline proc "contextless" () -> (range : Range2) {
// }
}
ui_context :: #force_inline proc() -> ^UI_State { return get_state().ui_context }
ui_context :: #force_inline proc "contextless" () -> ^UI_State { return get_state().ui_context }

View File

@ -151,9 +151,12 @@ ui_box_tranverse_next_depth_based :: #force_inline proc "contextless" ( box : ^
}
// Traveral pritorizes traversing a "anestry layer"
ui_box_traverse_next_layer_based :: proc "contextless" ( box : ^UI_Box, bypass_intersection_test := false ) -> (^UI_Box)
ui_box_traverse_next_layer_based :: proc "contextless" ( box : ^UI_Box, bypass_intersection_test := false, ctx : ^UI_State = nil ) -> (^UI_Box)
{
using state := get_state()
ctx := ctx
if ctx == nil {
ctx = ui_context()
}
parent := box.parent
if parent != nil