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.

This commit is contained in:
Eric M
2022-09-25 00:32:53 +10:00
parent fd4572cc45
commit a3ed9e6f2c
11 changed files with 64 additions and 92 deletions

View File

@@ -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>