imgui: Add get_window_width, get_window_height helper functions

This commit is contained in:
Malik Olivier Boussejra 2018-03-26 16:10:47 +09:00
parent d6897b1556
commit 0d10358942

View File

@ -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