jroimartin / gocui

Minimalist Go package aimed at creating Console User Interfaces.
BSD 3-Clause "New" or "Revised" License
9.92k stars 608 forks source link

Added default option to mainloop select #250

Open infEreb opened 10 months ago

infEreb commented 10 months ago

With this we no longer have to wait for any update events for View to update, this would be very helpful for creating dynamic widgets and generally more convenient than cumbersome userEvents

This doesn't break the old logic and keeps the need for userEvents for some cases I would be very grateful if you would accept

infEreb commented 10 months ago

If you favor the old logic, how about at least a bool flag (e.g. Dynamic) that would be in Gui and used in the default select

default:
    if !g.Dynamic {
        continue
    }