You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good day. I've updated my project's version of egui to the latest of writing, 0.34.3, and it's been pretty good.
Only one problem, my rectangles seem to no longer sense hover or sense even being clicked.
let center_rect = egui::Rect::from_center_size(
egui::pos2(split_x_pos, split_y_pos),
egui::vec2(center_size, center_size),
);
let center_response = ui.allocate_rect(center_rect, egui::Sense::click_and_drag());
if center_response.clicked() {
panic!()
}
if center_response.hovered() {
ui.set_cursor_icon(egui::CursorIcon::AllScroll);
}
I've looked around the Q&A but found no mentions to changes to how to handle drawing rectangles and detecting clicks. If this is wrong, please do let me know and I will delete this post.
Note: This rect is allocated and drawn above other rects and all of this code is within a deprecated CentralPanel::default().show(ui, |ui| {}); method, have there been changes there as well?
Also, the panic there was to test clicking even worked (which it doesn't).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Good day. I've updated my project's version of egui to the latest of writing, 0.34.3, and it's been pretty good.
Only one problem, my rectangles seem to no longer sense hover or sense even being clicked.
I've looked around the Q&A but found no mentions to changes to how to handle drawing rectangles and detecting clicks. If this is wrong, please do let me know and I will delete this post.
Note: This rect is allocated and drawn above other rects and all of this code is within a deprecated CentralPanel::default().show(ui, |ui| {}); method, have there been changes there as well?
Also, the panic there was to test clicking even worked (which it doesn't).
Any thoughts or suggestions are welcome.
Beta Was this translation helpful? Give feedback.
All reactions