Merge pull request #97106 from SkylerGoh-dev/Add-further-clarification-to-Shortcut-and-InputEvent.is_match()-method-documentation
Clarify behavior of `InputEvent.is_match` and `Shortcut.matches_event`
This commit is contained in:
commit
ac789750eb
@ -91,6 +91,7 @@
|
|||||||
<description>
|
<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.
|
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.
|
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>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="is_pressed" qualifiers="const">
|
<method name="is_pressed" qualifiers="const">
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
<return type="bool" />
|
<return type="bool" />
|
||||||
<param index="0" name="event" type="InputEvent" />
|
<param index="0" name="event" type="InputEvent" />
|
||||||
<description>
|
<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>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
|
Loading…
Reference in New Issue
Block a user