1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Document that transparent StyleBoxes/textures should be used for UI focus

This commit is contained in:
Hugo Locurcio
2021-11-20 17:43:34 +01:00
parent 1cbf3947d6
commit a1ab50a9f0
12 changed files with 12 additions and 12 deletions

View File

@@ -80,7 +80,7 @@
[StyleBox] used when the [MenuButton] is disabled.
</theme_item>
<theme_item name="focus" data_type="style" type="StyleBox">
[StyleBox] used when the [MenuButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
[StyleBox] used when the [MenuButton] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
</theme_item>
<theme_item name="hover" data_type="style" type="StyleBox">
[StyleBox] used when the [MenuButton] is being hovered.