Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GUI] Focus improvements #493

Open
thecack opened this issue Apr 6, 2018 · 3 comments
Open

[GUI] Focus improvements #493

thecack opened this issue Apr 6, 2018 · 3 comments
Assignees
Milestone

Comments

@thecack
Copy link

thecack commented Apr 6, 2018

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.

@craftworkgames
Copy link
Collaborator

@thecack All good ideas. I'll consider them for 2.0.

@HateMeLikeAPro
Copy link

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 :)

@craftworkgames
Copy link
Collaborator

@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.

@craftworkgames craftworkgames added this to the 2.0 Release milestone Oct 1, 2018
@craftworkgames craftworkgames removed this from the 2.0 Release milestone Jul 22, 2019
@lithiumtoast lithiumtoast removed the gui label May 20, 2020
@lithiumtoast lithiumtoast self-assigned this May 20, 2020
@lithiumtoast lithiumtoast added this to the v4 milestone May 20, 2020
@lithiumtoast lithiumtoast modified the milestones: v4, v4.1 Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants