Wrap get_text_line_height_with_spacing && get_item_rect_size

This commit is contained in:
Malik Olivier Boussejra 2018-04-13 14:27:22 +00:00
parent 43ea9a9693
commit 1a1fe3bad5

View File

@ -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> {
/// Creates a progress bar. Fraction is the progress level with 0.0 = 0% and 1.0 = 100%.
///