mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 12:50:04 -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
|
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))`
|
/// 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.
|
// TODO(emilk): I'm not sure this is a good interface for this.
|
||||||
pub fn mutate(mut self, mutate: impl Fn(&mut Self)) -> Self {
|
pub fn mutate(mut self, mutate: impl Fn(&mut Self)) -> Self {
|
||||||
|
|||||||
Reference in New Issue
Block a user