diff options
author | Eric M <itsjusteza@gmail.com> | 2022-09-25 00:32:53 +1000 |
---|---|---|
committer | Eric M <itsjusteza@gmail.com> | 2022-10-13 21:07:19 +1000 |
commit | a3ed9e6f2cfb539418b06d75fc96352634b81352 (patch) | |
tree | fd2bba9175b4435b5dfd5247e8023a136e1d5794 /doc/classes | |
parent | fd4572cc45506f901e68a2cb485f44ffd01b937e (diff) |
Move Shortcut Context to Control and ensure that `shortcut_input` adheres to contexts. Also ensure that controls with no context are only triggered AFTER nodes which do have a context.
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/BaseButton.xml | 3 | ||||
-rw-r--r-- | doc/classes/Control.xml | 3 | ||||
-rw-r--r-- | doc/classes/MenuBar.xml | 3 |
3 files changed, 3 insertions, 6 deletions
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 629675132a..47e1f85c97 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -68,9 +68,6 @@ <member name="shortcut" type="Shortcut" setter="set_shortcut" getter="get_shortcut"> [Shortcut] associated to the button. </member> - <member name="shortcut_context" type="Node" setter="set_shortcut_context" getter="get_shortcut_context"> - The [Node] which must be a parent of the focused GUI [Control] for the shortcut to be activated. If [code]null[/code], the shortcut can be activated when any control is focused (a global shortcut). This allows shortcuts to be accepted only when the user has a certain area of the GUI focused. - </member> <member name="shortcut_in_tooltip" type="bool" setter="set_shortcut_in_tooltip" getter="is_shortcut_in_tooltip_enabled"> If [code]true[/code], the button will add information about its shortcut in the tooltip. </member> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 9c7cb7b089..7968b03c4b 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -1051,6 +1051,9 @@ [b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=$DOCS_URL/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually. [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instantiated. To set the Control's scale when it's instantiated, wait for one frame using [code]await get_tree().process_frame[/code] then set its [member scale] property. </member> + <member name="shortcut_context" type="Node" setter="set_shortcut_context" getter="get_shortcut_context"> + The [Node] which must be a parent of the focused [Control] for the shortcut to be activated. If [code]null[/code], the shortcut can be activated when any control is focused (a global shortcut). This allows shortcuts to be accepted only when the user has a certain area of the GUI focused. + </member> <member name="size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2(0, 0)"> The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically. </member> diff --git a/doc/classes/MenuBar.xml b/doc/classes/MenuBar.xml index 3ef0572e9f..e8505937ff 100644 --- a/doc/classes/MenuBar.xml +++ b/doc/classes/MenuBar.xml @@ -106,9 +106,6 @@ <member name="prefer_global_menu" type="bool" setter="set_prefer_global_menu" getter="is_prefer_global_menu" default="true"> If [code]true[/code], [MenuBar] will use system global menu when supported. </member> - <member name="shortcut_context" type="Node" setter="set_shortcut_context" getter="get_shortcut_context"> - The [Node] which must be a parent of the focused GUI [Control] for the shortcut to be activated. If [code]null[/code], the shortcut can be activated when any control is focused (a global shortcut). This allows shortcuts to be accepted only when the user has a certain area of the GUI focused. - </member> <member name="start_index" type="int" setter="set_start_index" getter="get_start_index" default="-1"> Position in the global menu to insert first [MenuBar] item at. </member> |