Skip to content

[GUI] Focus improvements #3

Description

@thecack

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions