diff options
author | CaTaTo <vahnenko2003@gmail.com> | 2023-12-12 18:47:28 +0300 |
---|---|---|
committer | CaTaTo <vahnenko2003@gmail.com> | 2023-12-13 08:07:36 +0300 |
commit | 075a54bbcf9dd6f7ed9ed22413c88e0710224f0c (patch) | |
tree | fee8fbc9894b5008646d874401cd58c15a65b397 /core | |
parent | 84692c6252438393999c427bf7f5d35b9c43926c (diff) | |
download | redot-engine-075a54bbcf9dd6f7ed9ed22413c88e0710224f0c.tar.gz |
Add bindings for setting and getting emulation mouse from touch and touch from mouse in input
Diffstat (limited to 'core')
-rw-r--r-- | core/input/input.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/input/input.cpp b/core/input/input.cpp index 14cb8bcf4e..8f976cbaa3 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -143,9 +143,15 @@ void Input::_bind_methods() { ClassDB::bind_method(D_METHOD("set_use_accumulated_input", "enable"), &Input::set_use_accumulated_input); ClassDB::bind_method(D_METHOD("is_using_accumulated_input"), &Input::is_using_accumulated_input); ClassDB::bind_method(D_METHOD("flush_buffered_events"), &Input::flush_buffered_events); + ClassDB::bind_method(D_METHOD("set_emulate_mouse_from_touch", "enable"), &Input::set_emulate_mouse_from_touch); + ClassDB::bind_method(D_METHOD("is_emulating_mouse_from_touch"), &Input::is_emulating_mouse_from_touch); + ClassDB::bind_method(D_METHOD("set_emulate_touch_from_mouse", "enable"), &Input::set_emulate_touch_from_mouse); + ClassDB::bind_method(D_METHOD("is_emulating_touch_from_mouse"), &Input::is_emulating_touch_from_mouse); ADD_PROPERTY(PropertyInfo(Variant::INT, "mouse_mode"), "set_mouse_mode", "get_mouse_mode"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_accumulated_input"), "set_use_accumulated_input", "is_using_accumulated_input"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emulate_mouse_from_touch"), "set_emulate_mouse_from_touch", "is_emulating_mouse_from_touch"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "emulate_touch_from_mouse"), "set_emulate_touch_from_mouse", "is_emulating_touch_from_mouse"); BIND_ENUM_CONSTANT(MOUSE_MODE_VISIBLE); BIND_ENUM_CONSTANT(MOUSE_MODE_HIDDEN); |