mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Constrain menus to the screen
This commit is contained in:
@@ -143,9 +143,10 @@ pub(crate) fn menu_ui<'c, R>(
|
||||
|
||||
let area = Area::new(menu_id)
|
||||
.order(Order::Foreground)
|
||||
.constrain(true)
|
||||
.fixed_pos(pos)
|
||||
.interactable(true)
|
||||
.drag_bounds(Rect::EVERYTHING);
|
||||
.drag_bounds(ctx.screen_rect());
|
||||
let inner_response = area.show(ctx, |ui| {
|
||||
set_menu_style(ui.style_mut());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user