Merge pull request #76719 from m4gr3d/add_input_event_cancelled_state_main
Augment the `InputEvent` class with a `CANCELED` state
This commit is contained in:
commit
b0f49266f9
8 changed files with 83 additions and 76 deletions
|
|
@ -71,6 +71,12 @@
|
|||
Returns [code]true[/code] if this input event's type is one that can be assigned to an input action.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_canceled" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if this input event has been canceled.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_echo" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
|
|
@ -93,6 +99,12 @@
|
|||
[b]Note:[/b] Due to keyboard ghosting, [method is_pressed] may return [code]false[/code] even if one of the action's keys is pressed. See [url=$DOCS_URL/tutorials/inputs/input_examples.html#keyboard-events]Input examples[/url] in the documentation for more information.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_released" qualifiers="const">
|
||||
<return type="bool" />
|
||||
<description>
|
||||
Returns [code]true[/code] if this input event is released. Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag].
|
||||
</description>
|
||||
</method>
|
||||
<method name="xformed_by" qualifiers="const">
|
||||
<return type="InputEvent" />
|
||||
<param index="0" name="xform" type="Transform2D" />
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@
|
|||
<member name="button_index" type="int" setter="set_button_index" getter="get_button_index" enum="MouseButton" default="0">
|
||||
The mouse button identifier, one of the [enum MouseButton] button or button wheel constants.
|
||||
</member>
|
||||
<member name="canceled" type="bool" setter="set_canceled" getter="is_canceled" default="false">
|
||||
If [code]true[/code], the mouse button event has been canceled.
|
||||
</member>
|
||||
<member name="double_click" type="bool" setter="set_double_click" getter="is_double_click" default="false">
|
||||
If [code]true[/code], the mouse button's state is a double-click.
|
||||
</member>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@
|
|||
<link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link>
|
||||
</tutorials>
|
||||
<members>
|
||||
<member name="canceled" type="bool" setter="set_canceled" getter="is_canceled" default="false">
|
||||
If [code]true[/code], the touch event has been canceled.
|
||||
</member>
|
||||
<member name="double_tap" type="bool" setter="set_double_tap" getter="is_double_tap" default="false">
|
||||
If [code]true[/code], the touch's state is a double tap.
|
||||
</member>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue