mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-27 13:28:28 +00:00
Wrap get_text_line_height_with_spacing && get_item_rect_size
This commit is contained in:
parent
43ea9a9693
commit
1a1fe3bad5
13
src/lib.rs
13
src/lib.rs
@ -953,6 +953,19 @@ impl<'ui> Ui<'ui> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'ui> Ui<'ui> {
|
||||||
|
/// Get height of a line of previously drawn text item
|
||||||
|
pub fn get_text_line_height_with_spacing(&self) -> f32 {
|
||||||
|
unsafe { sys::igGetTextLineHeightWithSpacing() }
|
||||||
|
}
|
||||||
|
/// Get previously drawn item's size
|
||||||
|
pub fn get_item_rect_size(&self) -> (f32, f32) {
|
||||||
|
let mut out = ImVec2::new(0.0, 0.0);
|
||||||
|
unsafe { sys::igGetItemRectSize(&mut out); }
|
||||||
|
(out.x, out.y)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<'ui> Ui<'ui> {
|
impl<'ui> Ui<'ui> {
|
||||||
/// Creates a progress bar. Fraction is the progress level with 0.0 = 0% and 1.0 = 100%.
|
/// Creates a progress bar. Fraction is the progress level with 0.0 = 0% and 1.0 = 100%.
|
||||||
///
|
///
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user