Exposed shortcut_context property to scripting and added documentation.

I didn't expose this as a property or add documentation in the original PR #42109.
This commit is contained in:
Eric M
2020-11-30 00:11:40 +10:00
parent d1943f6a77
commit 12ded391f5
2 changed files with 4 additions and 0 deletions

View File

@@ -65,6 +65,9 @@
<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" default="true">
If [code]true[/code], the button will add information about its shortcut in the tooltip.
</member>