You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow one widget to have focus, which grabs control of all keybinds. Also have a global key handler if the widget doesn't use a certain key. Would be good for being able to scroll different widgets.
Some ideas:
maybe have a callback per widget for when the widget gains focus
would allow for the widget to update its appearance
The text was updated successfully, but these errors were encountered:
In PR #257 I just added a variable you can check to see if the widget is currently "Active", although I think maybe it would make sense to call it "InFocus". You can cycle through all of the widgets you care about in the event handler and check if each one is currently focused. I also added a way of setting the "ActiveStyle" (maybe InFocusStyle?) so that you can visually tell which widget is currently in focus.
The nice part about doing it this way is that it doesn't add anything unwieldy to the current code base and shouldn't break any legacy code. There's also not much you need to do to make it work.
The down side to this approach is that you could potentially have multiple widgets in focus simultaneously as there's nothing preventing that case. You'll have to manage the focus yourself in your own code, but I think that's a reasonable tradeoff.
Allow one widget to have focus, which grabs control of all keybinds. Also have a global key handler if the widget doesn't use a certain key. Would be good for being able to scroll different widgets.
Some ideas:
The text was updated successfully, but these errors were encountered: