mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-07 14:28:40 +00:00
fix hack to stop busted animation when minimized - just bounds check the content rectangle
This commit is contained in:
@@ -206,18 +206,6 @@ rd_entity_from_handle(RD_Handle handle)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal RD_HandleList
|
|
||||||
rd_handle_list_from_entity_list(Arena *arena, RD_EntityList entities)
|
|
||||||
{
|
|
||||||
RD_HandleList result = {0};
|
|
||||||
for(RD_EntityNode *n = entities.first; n != 0; n = n->next)
|
|
||||||
{
|
|
||||||
RD_Handle handle = rd_handle_from_entity(n->entity);
|
|
||||||
rd_handle_list_push(arena, &result, handle);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
//- rjf: entity recursion iterators
|
//- rjf: entity recursion iterators
|
||||||
|
|
||||||
internal RD_EntityRec
|
internal RD_EntityRec
|
||||||
@@ -6889,13 +6877,11 @@ rd_window_frame(RD_Window *ws)
|
|||||||
////////////////////////////
|
////////////////////////////
|
||||||
//- rjf: animate panels
|
//- rjf: animate panels
|
||||||
//
|
//
|
||||||
// TODO(rjf): @hack investigate why we were ever animating to a busted
|
|
||||||
// rectangle when minimized...
|
|
||||||
//
|
|
||||||
if(!os_window_is_minimized(ws->os))
|
|
||||||
{
|
{
|
||||||
F32 rate = rd_setting_val_from_code(RD_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-50.f * rd_state->frame_dt)) : 1.f;
|
F32 rate = rd_setting_val_from_code(RD_SettingCode_MenuAnimations).s32 ? 1 - pow_f32(2, (-50.f * rd_state->frame_dt)) : 1.f;
|
||||||
Vec2F32 content_rect_dim = dim_2f32(content_rect);
|
Vec2F32 content_rect_dim = dim_2f32(content_rect);
|
||||||
|
if(content_rect_dim.x > 0 && content_rect_dim.y > 0)
|
||||||
|
{
|
||||||
for(RD_Panel *panel = ws->root_panel; !rd_panel_is_nil(panel); panel = rd_panel_rec_depth_first_pre(panel).next)
|
for(RD_Panel *panel = ws->root_panel; !rd_panel_is_nil(panel); panel = rd_panel_rec_depth_first_pre(panel).next)
|
||||||
{
|
{
|
||||||
Rng2F32 target_rect_px = rd_target_rect_from_panel(content_rect, ws->root_panel, panel);
|
Rng2F32 target_rect_px = rd_target_rect_from_panel(content_rect, ws->root_panel, panel);
|
||||||
@@ -6920,6 +6906,7 @@ rd_window_frame(RD_Window *ws)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////
|
////////////////////////////
|
||||||
//- rjf: panel leaf UI
|
//- rjf: panel leaf UI
|
||||||
|
|||||||
@@ -998,7 +998,6 @@ internal B32 rd_entity_is_nil(RD_Entity *entity);
|
|||||||
internal U64 rd_index_from_entity(RD_Entity *entity);
|
internal U64 rd_index_from_entity(RD_Entity *entity);
|
||||||
internal RD_Handle rd_handle_from_entity(RD_Entity *entity);
|
internal RD_Handle rd_handle_from_entity(RD_Entity *entity);
|
||||||
internal RD_Entity *rd_entity_from_handle(RD_Handle handle);
|
internal RD_Entity *rd_entity_from_handle(RD_Handle handle);
|
||||||
internal RD_HandleList rd_handle_list_from_entity_list(Arena *arena, RD_EntityList entities);
|
|
||||||
|
|
||||||
//- rjf: entity recursion iterators
|
//- rjf: entity recursion iterators
|
||||||
internal RD_EntityRec rd_entity_rec_depth_first(RD_Entity *entity, RD_Entity *subtree_root, U64 sib_off, U64 child_off);
|
internal RD_EntityRec rd_entity_rec_depth_first(RD_Entity *entity, RD_Entity *subtree_root, U64 sib_off, U64 child_off);
|
||||||
|
|||||||
Reference in New Issue
Block a user