Merge pull request #283 from malikolivier/implement-childwindow-movable

Implement ChildWindow::movable
This commit is contained in:
Joonas Javanainen 2019-12-08 00:48:48 +02:00 committed by GitHub
commit 2b06a1466e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -2,6 +2,10 @@
## [Unreleased]
### Added
- Add `ChildWindow::movable`
### Changed
- Upgrade to cimgui / imgui 1.73

View File

@ -83,6 +83,14 @@ impl<'a> ChildWindow<'a> {
self.border = border;
self
}
/// Enables/disables moving the window when child window is dragged.
///
/// Enabled by default.
#[inline]
pub fn movable(mut self, value: bool) -> Self {
self.flags.set(WindowFlags::NO_MOVE, !value);
self
}
/// Enables/disables scrollbars (scrolling is still possible with the mouse or
/// programmatically).
///