Expose area interactable and movable to Window api. (#2610)
* Expose area interactable to window. * Add movable function * update dockstring
This commit is contained in:
parent
01bbda4544
commit
30e49f1da2
1 changed files with 12 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue