Closed bananaturtlesandwich closed 2 years ago
No worries, it's just nice to get some feedback and get the bugs fixed 👍
I have fixed one issue in ca30cd0e , unfortunately you'll have to pass in the viewport in GUI::update
instead of GUI::render
.
You also need to use
panel_width = gui_context.used_rect().width() as f64;
instead of
panel_width = gui_context.used_size().x as f64;
.
Sorry to be a pain about the egui integration again but I think there might be an issue with anchoring For example, in spawning a
SidePanel
(I'll use the screen demo as an example)By modifying the demo to use
SidePanel::right
instead ofSidePanel::left
, a crash occurs when the ui width is subtracted from the full width of the window due to a cast to u32 from a negative resultThe reason for the crash can be seen with the
dbg!
macro to inspectpanel_width
- withSidePanel::left
,panel_width
is 228 while withSidePanel::right
,panel_width
is 10000 - larger than the full width of the windowThis issue also occurs when using the
egui-notify
crate as the notifications are anchored to the top right by defaultI'm honestly not experienced enough to know why this happens but I hope my observations are useful