mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
Expose area interactable and movable to Window api. (#2610)
* Expose area interactable to window. * Add movable function * update dockstring
This commit is contained in:
@@ -79,6 +79,18 @@ impl<'open> Window<'open> {
|
||||
self
|
||||
}
|
||||
|
||||
/// If `false` the window will be non-interactive.
|
||||
pub fn interactable(mut self, interactable: bool) -> Self {
|
||||
self.area = self.area.interactable(interactable);
|
||||
self
|
||||
}
|
||||
|
||||
/// If `false` the window will be immovable.
|
||||
pub fn movable(mut self, movable: bool) -> Self {
|
||||
self.area = self.area.movable(movable);
|
||||
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.
|
||||
pub fn mutate(mut self, mutate: impl Fn(&mut Self)) -> Self {
|
||||
|
||||
Reference in New Issue
Block a user