-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add seperate focus style to controls for keyboard/gamepad and mouse/touch #6577
Comments
I haven't seen any modern applications use separate styles for different focus types. What I've seen though is not drawing any focus outline for mouse-induced focus, but this is exactly what #2011 covers (I have a WIP at https://github.com/Calinou/godot/tree/button-focus-visible). |
I do have an issue with calling it mouse and keyboard focus since mouse could be touch and keyboard could be gamepad. |
I was struggling with this since the current way focus works makes it very hard to make a GUI with both mouse and keyboard support without mouse users having their UI cluttered with a noisy focus style. For most apps, it would already be helpful for Control nodes to have a 'keyboard only' focus mode so that users don't see a focus when they don't need to. I agree that this proposal would be the best way to handle it though. A current workaround I thought of using is to have two separate themes that activate based on the input (mouse or keyboard), but this feels incredibly hacky, and doesn't work for the windows 95 theme example. Let me know if anyone has a better workaround though.
I agree, maybe something like Keyboard -> Directional, and Mouse -> Screen? |
Describe the project you are working on
Windows 95 Theme
Describe the problem or limitation you are having in your project
Godot has a limitation where it treats both keyboard and mouse focus and the same thing
This makes it impossible to make a accurate windows 95 theme due to the fact win32 treated them separately
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Here is a picture of a windows95 button without any keyboard or mouse focus
Here is a picture of a windows95 button with both keyboard focus (dotted rectangle) and mouse focus (black border)
If this enhancement will not be used often, can it be worked around with a few lines of script?
No
Is there a reason why this should be core and not an add-on in the asset library?
It makes themes most customizable
The text was updated successfully, but these errors were encountered: