Support order on windows (#4301)

Adds support for the ordering of windows passing through to the
underlying area.

Needed for a specific usecase of adding debug tools using windows with
the bevy integration.
This commit is contained in:
Alexander Parlett 2024-04-02 09:33:14 +01:00 committed by GitHub
parent 058f4753b0
commit 4bc7e66245
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -104,6 +104,13 @@ impl<'open> Window<'open> {
self
}
/// `order(Order::Foreground)` for a Window that should always be on top
#[inline]
pub fn order(mut self, order: Order) -> Self {
self.area = self.area.order(order);
self
}
/// Usage: `Window::new(…).mutate(|w| w.resize = w.resize.auto_expand_width(true))`
// TODO(emilk): I'm not sure this is a good interface for this.
#[inline]