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
This isn't so much an issue as it would be a feature request - and I'm not really sure how pull requests work. I've noticed that you're working on a 2.0 version, and I feel like there's a couple things that could be considered about how focus is handled.
First, that some controls might not want to be focused. Things like generic labels and panels probably shouldn't consume focus from buttons and the like on errant pointer presses. Adding a CanFocus property to Control and modifying GuiSystem to respect it would be pretty minimal.
Second, a focus-manager type system. It's definitely a more keyboard specific thing, but it's nice to be able to advance to the next or previous focusable control. I would think you could get an enumerable of focusable items from GuiSystem with the currently focused control as the current item. WinForms uses TabStops, which aren't particularly elegant but could allow for a bit more behavior customization.
Third, a FocusedControlStyle. Visual cues are always a nice touch to know what particular control has focus.
The text was updated successfully, but these errors were encountered:
I'm quite new to this project, but it seems to be really useful!
I've written a couple UI frameworks during my time as dev. @craftworkgames going to dig into the UI system and will PR if I think I have something to contribute :)
@itswiki Just keep in mind that I've done some serious refactoring in the 2.0 branch.
The GUI system will be quite difference in the next major release.
This isn't so much an issue as it would be a feature request - and I'm not really sure how pull requests work. I've noticed that you're working on a 2.0 version, and I feel like there's a couple things that could be considered about how focus is handled.
First, that some controls might not want to be focused. Things like generic labels and panels probably shouldn't consume focus from buttons and the like on errant pointer presses. Adding a CanFocus property to Control and modifying GuiSystem to respect it would be pretty minimal.
Second, a focus-manager type system. It's definitely a more keyboard specific thing, but it's nice to be able to advance to the next or previous focusable control. I would think you could get an enumerable of focusable items from GuiSystem with the currently focused control as the current item. WinForms uses TabStops, which aren't particularly elegant but could allow for a bit more behavior customization.
Third, a FocusedControlStyle. Visual cues are always a nice touch to know what particular control has focus.
The text was updated successfully, but these errors were encountered: