Augment the InputEvent class with a CANCELED state
The `InputEvent` class currently supports the `pressed` and `released` states, which given the binary nature, is represented by a `bool` field. This commit introduced the `CANCELED` state, which signals that an ongoing input event has been canceled. To represent all the states, the `InputEventState` enum is added and the `InputEvent` logic is refactored accordingly.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user