2017-09-13 04:42:36 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
2020-09-10 03:53:24 +08:00
|
|
|
<class name="Shortcut" inherits="Resource" version="4.0">
|
2017-09-13 04:42:36 +08:00
|
|
|
<brief_description>
|
2017-11-27 03:58:38 +08:00
|
|
|
A shortcut for binding input.
|
2017-09-13 04:42:36 +08:00
|
|
|
</brief_description>
|
|
|
|
<description>
|
2017-11-27 03:58:38 +08:00
|
|
|
A shortcut for binding input.
|
2021-08-03 23:27:45 +08:00
|
|
|
Shortcuts are commonly used for interacting with a [Control] element from an [InputEvent] (also known as hotkeys).
|
2017-09-13 04:42:36 +08:00
|
|
|
</description>
|
|
|
|
<tutorials>
|
|
|
|
</tutorials>
|
|
|
|
<methods>
|
|
|
|
<method name="get_as_text" qualifiers="const">
|
2021-07-30 21:28:05 +08:00
|
|
|
<return type="String" />
|
2017-09-13 04:42:36 +08:00
|
|
|
<description>
|
2018-09-17 01:52:21 +08:00
|
|
|
Returns the shortcut's [InputEvent] as a [String].
|
2017-09-13 04:42:36 +08:00
|
|
|
</description>
|
|
|
|
</method>
|
2021-08-03 23:27:45 +08:00
|
|
|
<method name="has_valid_event" qualifiers="const">
|
2021-07-30 21:28:05 +08:00
|
|
|
<return type="bool" />
|
2017-09-13 04:42:36 +08:00
|
|
|
<description>
|
2021-08-03 23:27:45 +08:00
|
|
|
Returns whether the shortcut has a valid [member event] assigned to it.
|
2017-09-13 04:42:36 +08:00
|
|
|
</description>
|
|
|
|
</method>
|
2021-08-03 23:27:45 +08:00
|
|
|
<method name="matches_event" qualifiers="const">
|
2021-07-30 21:28:05 +08:00
|
|
|
<return type="bool" />
|
2021-08-03 23:27:45 +08:00
|
|
|
<argument index="0" name="event" type="InputEvent" />
|
2017-09-13 04:42:36 +08:00
|
|
|
<description>
|
2021-08-03 23:27:45 +08:00
|
|
|
Returns whether the shortcut's [member event] matches [code]event[/code].
|
2017-09-13 04:42:36 +08:00
|
|
|
</description>
|
|
|
|
</method>
|
|
|
|
</methods>
|
|
|
|
<members>
|
2021-08-03 23:27:45 +08:00
|
|
|
<member name="event" type="InputEvent" setter="set_event" getter="get_event">
|
2018-09-17 01:52:21 +08:00
|
|
|
The shortcut's [InputEvent].
|
2021-08-03 23:27:45 +08:00
|
|
|
Generally the [InputEvent] is a keyboard key, though it can be any [InputEvent], including an [InputEventAction].
|
2017-09-13 04:42:36 +08:00
|
|
|
</member>
|
|
|
|
</members>
|
|
|
|
<constants>
|
|
|
|
</constants>
|
|
|
|
</class>
|