Is there any way to respond to the Window Resized Event under eframe
?
#4844
Answered
by
wangxiaochuTHU
wangxiaochuTHU
asked this question in
Q&A
-
Such that inside eframe::App::update one can writes codes looking like let window_resized_event : bool = ?????? // <----- this becomes true once the winit Window is resized
if window_resized_event {
self.resized_cnt += 1;
} Thanks for any help. |
Beta Was this translation helpful? Give feedback.
Answered by
wangxiaochuTHU
Oct 10, 2024
Replies: 1 comment
-
Finally, I achieved this goal by monitoring the size of an arbitary drawing rect, e.g. let current_size = ui.available_size(); // or some other rect's size
if self.cached_size != current_size {
self.is_size_changed= true;
self.cached_size = current_size ;
}
if self.is_size_changed {
// TODO: Make response here
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
wangxiaochuTHU
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Finally, I achieved this goal by monitoring the size of an arbitary drawing rect, e.g.