mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-12 05:58:35 +00:00
commit
e60e5161c5
@ -321,6 +321,12 @@ impl ImVec2 {
|
||||
y: y as c_float,
|
||||
}
|
||||
}
|
||||
pub fn zero() -> ImVec2 {
|
||||
ImVec2 {
|
||||
x: 0.0 as c_float,
|
||||
y: 0.0 as c_float,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<[f32; 2]> for ImVec2 {
|
||||
|
||||
@ -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()) }
|
||||
}
|
||||
@ -616,6 +619,9 @@ impl<'ui> Ui<'ui> {
|
||||
unsafe { imgui_sys::igEndPopup() };
|
||||
}
|
||||
}
|
||||
pub fn close_current_popup(&self) {
|
||||
unsafe { imgui_sys::igCloseCurrentPopup() };
|
||||
}
|
||||
}
|
||||
|
||||
// Widgets: Combos
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user