Skip to content

Commit

Permalink
combo: allow empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
gucio321 committed Mar 5, 2024
1 parent 91904cc commit 774b2ce
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Widgets.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ func (c *ComboWidget) Build() {

if imgui.BeginComboV(Context.FontAtlas.RegisterString(c.label), c.previewValue, imgui.ComboFlags(c.flags)) {
for i, item := range c.items {
if imgui.SelectableBool(item) {
i := i
if imgui.SelectableBool(fmt.Sprintf("%s##%d", item, i)) {
*c.selected = int32(i)
if c.onChange != nil {
c.onChange()
Expand Down

0 comments on commit 774b2ce

Please sign in to comment.