Skip to content

Add seperate focus style to controls for keyboard/gamepad and mouse/touch #6577

@Shadowblitz16

Description

@Shadowblitz16

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

  • Rename focus style to keyboard focus
  • Add mouse focus
  • Rename Control.grab_focus to Control.grab_keyboard_focus()
  • Add Control.grab_mouse_focus()
  • Add ablity to add shaders to focus styles (this is due to the fact that keyboard focus in win32 uses a negative filter)

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
image

Here is a picture of a windows95 button with both keyboard focus (dotted rectangle) and mouse focus (black border)
image

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions