summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskyler <35615419+SkylerGoh-dev@users.noreply.github.com>2024-09-17 03:20:36 -0700
committerskyler <35615419+SkylerGoh-dev@users.noreply.github.com>2024-09-17 04:12:34 -0700
commit4f4fd1a05ccef55a9f9c3a6b5ad67e5c495921cc (patch)
treef8c91ea84bc060d16f65271db7629ca097dfa30b
parent02b16d2f544e323b7b7f57e6e992b0b8e5d8b954 (diff)
downloadredot-engine-4f4fd1a05ccef55a9f9c3a6b5ad67e5c495921cc.tar.gz
Clarify behavior of InputEvent.is_match and Shortcut.matches_event
- Shortcut: Clarifies how matches_event() method compares events - InputEvent: Clarifies is_match() method does not consider event states
-rw-r--r--doc/classes/InputEvent.xml1
-rw-r--r--doc/classes/Shortcut.xml2
2 files changed, 2 insertions, 1 deletions
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index a970f63c6e..6cf490accb 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -91,6 +91,7 @@
<description>
Returns [code]true[/code] if the specified [param event] matches this event. Only valid for action events i.e key ([InputEventKey]), button ([InputEventMouseButton] or [InputEventJoypadButton]), axis [InputEventJoypadMotion] or action ([InputEventAction]) events.
If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ [b]Note:[/b] Only considers the event configuration (such as the keyboard key or joypad axis), not state information like [method is_pressed], [method is_released], [method is_echo], or [method is_canceled].
</description>
</method>
<method name="is_pressed" qualifiers="const">
diff --git a/doc/classes/Shortcut.xml b/doc/classes/Shortcut.xml
index 4343a789fd..b1e931aef8 100644
--- a/doc/classes/Shortcut.xml
+++ b/doc/classes/Shortcut.xml
@@ -26,7 +26,7 @@
<return type="bool" />
<param index="0" name="event" type="InputEvent" />
<description>
- Returns whether any [InputEvent] in [member events] equals [param event].
+ Returns whether any [InputEvent] in [member events] equals [param event]. This uses [method InputEvent.is_match] to compare events.
</description>
</method>
</methods>