You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
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:
@@ -83,13 +83,13 @@ private:
|
||||
|
||||
void _wheel_button_click(BitField<MouseButtonMask> event_buttons_mask, const Ref<InputEventMouseButton> &ev, MouseButton wheel_button, float factor);
|
||||
|
||||
void _parse_mouse_event_info(BitField<MouseButtonMask> event_buttons_mask, bool p_pressed, bool p_double_click, bool p_source_mouse_relative);
|
||||
void _parse_mouse_event_info(BitField<MouseButtonMask> event_buttons_mask, bool p_pressed, bool p_canceled, bool p_double_click, bool p_source_mouse_relative);
|
||||
|
||||
void _release_mouse_event_info(bool p_source_mouse_relative = false);
|
||||
|
||||
void _cancel_mouse_event_info(bool p_source_mouse_relative = false);
|
||||
|
||||
void _parse_all_touch(bool p_pressed, bool p_double_tap, bool reset_index = false);
|
||||
void _parse_all_touch(bool p_pressed, bool p_canceled = false, bool p_double_tap = false);
|
||||
|
||||
void _release_all_touch();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user