Exposed button function.

Size must be specified versus using the builder pattern.
This commit is contained in:
Cameron Hart 2016-12-30 16:29:12 +11:00
parent cbe8df8174
commit bb0d712cac

View File

@ -478,6 +478,9 @@ impl<'ui> Ui<'ui> {
imgui_sys::igBulletText(fmt_ptr(), text.as_ptr());
}
}
pub fn button<'p>(&self, label: ImStr<'p>, size: ImVec2) -> bool {
unsafe { imgui_sys::igButton(label.as_ptr(), size) }
}
pub fn small_button<'p>(&self, label: ImStr<'p>) -> bool {
unsafe { imgui_sys::igSmallButton(label.as_ptr()) }
}