mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-23 19:38:27 +00:00
imgui: Add get_window_width, get_window_height helper functions
This commit is contained in:
parent
d6897b1556
commit
0d10358942
12
src/lib.rs
12
src/lib.rs
@ -392,6 +392,18 @@ impl<'ui> Ui<'ui> {
|
|||||||
}
|
}
|
||||||
(out.x, out.y)
|
(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
|
// Layout
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user