mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-12 05:58:35 +00:00
Expose parameters to igSelectable.
This commit is contained in:
parent
73abfc21b4
commit
27bbe10107
@ -354,7 +354,7 @@ fn show_test_window<'a>(ui: &Ui<'a>, state: &mut State, opened: &mut bool) {
|
||||
ui.text(im_str!("Aquarium"));
|
||||
ui.separator();
|
||||
for (index, name) in names.iter().enumerate() {
|
||||
if ui.selectable(name.clone()) {
|
||||
if ui.selectable(name.clone(), false, ImGuiSelectableFlags::empty(), ImVec2::new(0.0, 0.0)) {
|
||||
state.selected_fish = Some(index);
|
||||
}
|
||||
}
|
||||
|
||||
@ -552,8 +552,9 @@ impl<'ui> Ui<'ui> {
|
||||
|
||||
// Widgets: Selectable / Lists
|
||||
impl<'ui> Ui<'ui> {
|
||||
pub fn selectable<'p>(&self, label: ImStr<'p>) -> bool {
|
||||
unsafe { imgui_sys::igSelectable(label.as_ptr(), false, ImGuiSelectableFlags::empty(), ImVec2::new(0.0,0.0)) }
|
||||
pub fn selectable<'p>(&self, label: ImStr<'p>, selected: bool, flags: ImGuiSelectableFlags,
|
||||
size: ImVec2) -> bool {
|
||||
unsafe { imgui_sys::igSelectable(label.as_ptr(), selected, flags, size) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user