mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-13 06:28:36 +00:00
Exposed a few functions related to content regions
This commit is contained in:
parent
d61e69eee2
commit
2b15498654
15
src/lib.rs
15
src/lib.rs
@ -613,6 +613,16 @@ impl<'ui> Ui<'ui> {
|
||||
let size = unsafe { sys::igGetWindowPos_nonUDT2() };
|
||||
size.into()
|
||||
}
|
||||
|
||||
pub fn get_window_content_region_min(&self) -> (f32, f32) {
|
||||
let size = unsafe { sys::igGetWindowContentRegionMin_nonUDT2() };
|
||||
size.into()
|
||||
}
|
||||
|
||||
pub fn get_window_content_region_max(&self) -> (f32, f32) {
|
||||
let size = unsafe { sys::igGetWindowContentRegionMax_nonUDT2() };
|
||||
size.into()
|
||||
}
|
||||
}
|
||||
|
||||
// Layout
|
||||
@ -718,6 +728,11 @@ impl<'ui> Ui<'ui> {
|
||||
unsafe { sys::igSetCursorPos(pos.into()) }
|
||||
}
|
||||
|
||||
pub fn get_content_region_max(&self) -> (f32, f32) {
|
||||
let size = unsafe { sys::igGetContentRegionMax_nonUDT2() };
|
||||
size.into()
|
||||
}
|
||||
|
||||
/// Get available space left between the cursor and the edges of the current
|
||||
/// window.
|
||||
pub fn get_content_region_avail(&self) -> (f32, f32) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user