Open linkerlin opened 7 years ago
Or input fields
I started on a change for buttons, but haven't gotten too far yet. Buttons really require a notion of "focus" so that you know which button you're actually pushing both visually and through the event handler. Speaking of the event handler, there's also no way of distinguishing a "button down"/"button up" event vs. a simple key press.
I did some digging and it looks like nsf/termbox-go, the library that termui uses, doesn't have any notion of "key down" and "key up", only "key pressed".
I went ahead and wrote a really simple button class which allows you to change focus between two different buttons (you hit the "tab" button to go back and forth), but really this should be a more fundamental thing where any widget can have/get focus.
Any update on Buttons implementation
I would like to take this issue please
Maybe we need something like buttons?