From 24ad9d526c1ce9c18eb47d3f78ab7bb85ecf5d71 Mon Sep 17 00:00:00 2001 From: Jack Mac Date: Mon, 21 Feb 2022 20:44:33 -0500 Subject: [PATCH] reworked the combo box to be less annoying --- imgui/src/widget/combo_box.rs | 82 ++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 40 deletions(-) diff --git a/imgui/src/widget/combo_box.rs b/imgui/src/widget/combo_box.rs index 6ca4b35..9b893f9 100644 --- a/imgui/src/widget/combo_box.rs +++ b/imgui/src/widget/combo_box.rs @@ -54,33 +54,37 @@ pub struct ComboBoxFlags: u32 { /// Builder for a combo box widget #[derive(Copy, Clone, Debug)] #[must_use] -pub struct ComboBox { - label: Label, - preview_value: Option, - flags: ComboBoxFlags, +pub struct ComboBox<'ui, Label, Preview = &'static str> { + pub label: Label, + pub preview_value: Option, + pub flags: ComboBoxFlags, + pub ui: &'ui Ui, } -impl> ComboBox