File tree 2 files changed +9
-11
lines changed
2 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -1667,8 +1667,6 @@ class frame : public region {
1667
1667
float min_height_ = 0 .0f ;
1668
1668
float max_height_ = std::numeric_limits<float >::infinity();
1669
1669
1670
- vector2f old_size_;
1671
-
1672
1670
float scale_ = 1 .0f ;
1673
1671
1674
1672
bool is_mouse_in_frame_ = false ;
Original file line number Diff line number Diff line change @@ -1509,7 +1509,16 @@ void frame::update_borders_() {
1509
1509
check_position_ ();
1510
1510
1511
1511
if (border_list_ != old_border_list || is_ready_ != old_ready) {
1512
+ if (border_list_.width () != old_border_list.width () ||
1513
+ border_list_.height () != old_border_list.height ()) {
1514
+ alive_checker checker (*this );
1515
+ fire_script (" OnSizeChanged" );
1516
+ if (!checker.is_alive ())
1517
+ return ;
1518
+ }
1519
+
1512
1520
get_manager ().get_root ().notify_hovered_frame_dirty ();
1521
+
1513
1522
if (backdrop_)
1514
1523
backdrop_->notify_borders_updated ();
1515
1524
}
@@ -1591,15 +1600,6 @@ void frame::update(float delta) {
1591
1600
}
1592
1601
}
1593
1602
}
1594
-
1595
- vector2f new_size = get_apparent_dimensions ();
1596
- if (old_size_ != new_size) {
1597
- fire_script (" OnSizeChanged" );
1598
- if (!checker.is_alive ())
1599
- return ;
1600
-
1601
- old_size_ = new_size;
1602
- }
1603
1603
}
1604
1604
1605
1605
} // namespace lxgui::gui
You can’t perform that action at this time.
0 commit comments