Another bugfix for hashmap_chained
This commit is contained in:
@ -64,7 +64,7 @@ UI_Style_Stack_Size :: 512
|
||||
UI_Parent_Stack_Size :: 512
|
||||
// UI_Built_Boxes_Array_Size :: 8
|
||||
UI_Built_Boxes_Array_Size :: 56 * Kilobyte
|
||||
UI_BoxCache_TableSize :: 4 * Kilobyte
|
||||
UI_BoxCache_TableSize :: 8 * Kilobyte
|
||||
|
||||
UI_RenderEntry :: struct {
|
||||
info : UI_RenderBoxInfo,
|
||||
@ -226,8 +226,9 @@ ui_graph_build_end :: proc( ui : ^UI_State )
|
||||
}
|
||||
|
||||
// Auto-layout and initial render_queue generation
|
||||
profile_begin("Auto-layout and render_queue generation")
|
||||
render_queue := array_to_slice(ui.render_queue)
|
||||
for current := root.first; current != nil; current = ui_box_tranverse_next_depth_first( current )
|
||||
for current := root.first; current != nil; current = ui_box_traverse_next_breadth_first( current, bypass_intersection_test = true )
|
||||
{
|
||||
if ! current.computed.fresh {
|
||||
ui_box_compute_layout( current )
|
||||
@ -293,7 +294,9 @@ ui_graph_build_end :: proc( ui : ^UI_State )
|
||||
}
|
||||
}
|
||||
}
|
||||
profile_end()
|
||||
|
||||
profile("render_list generation")
|
||||
when UI_Render_Method == .Layers
|
||||
{
|
||||
// render_queue overlap corrections & render_list generation
|
||||
@ -455,7 +458,7 @@ ui_hash_part_from_key_string :: proc ( content : string ) -> string {
|
||||
ui_key_from_string :: #force_inline proc "contextless" ( value : string ) -> UI_Key
|
||||
{
|
||||
// profile(#procedure)
|
||||
USE_RAD_DEBUGGERS_METHOD :: false
|
||||
USE_RAD_DEBUGGERS_METHOD :: true
|
||||
|
||||
key : UI_Key
|
||||
|
||||
|
@ -235,8 +235,8 @@ ui_compute_children_overall_bounds :: proc ( box : ^UI_Box ) -> ( children_bound
|
||||
|
||||
ui_box_compute_layout_children :: proc( box : ^UI_Box )
|
||||
{
|
||||
// for current := box.first; current != nil && current.prev != box; current = ui_box_traverse_next_breadth_first( current, )
|
||||
for current := box.first; current != nil && current.prev != box; current = ui_box_tranverse_next_depth_first( current, parent_limit = box )
|
||||
// for current := box.first; current != nil && current.prev != box; current = ui_box_tranverse_next_depth_first( current, parent_limit = box )
|
||||
for current := box.first; current != nil && current.prev != box; current = ui_box_traverse_next_breadth_first( current )
|
||||
{
|
||||
if current == box do return
|
||||
if current.computed.fresh do continue
|
||||
|
@ -190,7 +190,7 @@ test_whitespace_ast :: proc( default_layout : ^UI_Layout, frame_style_default :
|
||||
// index := 0
|
||||
widgets : Array(UI_Widget)
|
||||
// widgets, alloc_error = array_init_reserve( UI_Widget, frame_slab_allocator(), 8 )
|
||||
widgets, alloc_error = make( Array(UI_Widget), 4 * Kilobyte )
|
||||
widgets, alloc_error = make( Array(UI_Widget), 8 * Kilobyte )
|
||||
widgets_ptr := & widgets
|
||||
|
||||
label_id := 0
|
||||
|
@ -235,7 +235,7 @@ ui_resizable_end :: proc( resizable : ^UI_Resizable, pos, size : ^Vec2 ) {
|
||||
}
|
||||
|
||||
// Adds resizable handles to a widget
|
||||
ui_resizable_handles :: proc( parent : ^UI_Widget, pos : ^Vec2, size : ^Vec2,
|
||||
ui_resizable_handles :: #force_no_inline proc( parent : ^UI_Widget, pos : ^Vec2, size : ^Vec2,
|
||||
handle_width : f32 = 15,
|
||||
theme : ^UI_Theme = nil,
|
||||
left := true,
|
||||
@ -380,7 +380,7 @@ ui_resizable_handles :: proc( parent : ^UI_Widget, pos : ^Vec2, size : ^Vec2,
|
||||
}
|
||||
}
|
||||
|
||||
process_handle_drag :: proc ( handle : ^UI_Widget,
|
||||
process_handle_drag :: #force_no_inline proc ( handle : ^UI_Widget,
|
||||
direction : Vec2,
|
||||
target_alignment : Vec2,
|
||||
target_center_aligned : Vec2,
|
||||
@ -497,7 +497,7 @@ ui_resizable_handles :: proc( parent : ^UI_Widget, pos : ^Vec2, size : ^Vec2,
|
||||
if corner_bl do drag_signal |= process_handle_drag( & handle_corner_bl, { -1, -1 }, {1, 0}, { 0.5, -0.5}, pos, size, alignment )
|
||||
}
|
||||
|
||||
if drag_signal && compute_layout do ui_box_compute_layout(parent)
|
||||
// if drag_signal && compute_layout do ui_box_compute_layout(parent)
|
||||
return
|
||||
}
|
||||
#endregion("Resizable")
|
||||
|
Reference in New Issue
Block a user