mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 13:50:04 -04:00
Window: store inner size + misc improvements
This commit is contained in:
@@ -44,10 +44,11 @@ impl Memory {
|
||||
}
|
||||
}
|
||||
|
||||
/// TODO: call once at the start of the frame for the current mouse pos
|
||||
pub fn layer_at(&self, pos: Pos2) -> Layer {
|
||||
for window_id in self.window_order.iter().rev() {
|
||||
if let Some(state) = self.windows.get(window_id) {
|
||||
if state.rect.contains(pos) {
|
||||
if state.outer_rect.contains(pos) {
|
||||
return Layer::Window(*window_id);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user