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 6537b64
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)) {

Check failure on line 209 in Widgets.go

View workflow job for this annotation

GitHub Actions / Building (ubuntu-latest)

fmt.Sprintf format %d reads arg #2, but call has 1 arg

Check failure on line 209 in Widgets.go

View workflow job for this annotation

GitHub Actions / Building (windows-latest)

fmt.Sprintf format %d reads arg #2, but call has 1 arg

Check failure on line 209 in Widgets.go

View workflow job for this annotation

GitHub Actions / Building (macos-latest)

fmt.Sprintf format %d reads arg #2, but call has 1 arg
*c.selected = int32(i)
if c.onChange != nil {
c.onChange()
Expand Down

0 comments on commit 6537b64

Please sign in to comment.