mirror of
https://github.com/storytold/egui.git
synced 2026-11-22 18:41:52 +01: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:
1 parent
01bbda4544
commit
30e49f1da2
1 file changed
+12
@@ -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