diff --git a/src/lib.rs b/src/lib.rs index 7bee4ba..bbc23d2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -392,6 +392,18 @@ impl<'ui> Ui<'ui> { } (out.x, out.y) } + /// Get current window's width in pixels + pub fn get_window_width(&self) -> f32 { + unsafe { + sys::igGetWindowWidth() + } + } + /// Get current window's height in pixels + pub fn get_window_height(&self) -> f32 { + unsafe { + sys::igGetWindowHeight() + } + } } // Layout