Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bindings for setting and getting emulation mouse from touch and touch from mouse in input #86076

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
af4342e
Add bindings for setting and getting emulation mouse from touch and t…
KoTeYkA23 Dec 12, 2023
f29e014
Add bindings for setting and getting emulation mouse from touch and t…
KoTeYkA23 Dec 12, 2023
83ca6eb
Merge branch 'master' of https://github.com/KoTeYkA23/godot
KoTeYkA23 Dec 12, 2023
c193e80
Add bindings for setting and getting emulation mouse from touch and t…
KoTeYkA23 Dec 12, 2023
f21fc8d
Add bindings for setting and getting emulation mouse from touch and t…
KoTeYkA23 Dec 12, 2023
f3382ce
Merge branch 'master' of https://github.com/KoTeYkA23/godot
KoTeYkA23 Dec 12, 2023
ab3bda6
Add toaster notifications for import warning.
rakkarage Dec 5, 2023
b581bba
Implement render info counters for the 2D renderer
clayjohn Dec 5, 2023
8080cd3
Change suffix from m to px
Dec 12, 2023
cc736e9
Navigation: Fix GCC 12.3 `-Wtype-limits` warnings
akien-mga Dec 12, 2023
3fc4cc7
Add bindings for setting and getting emulation mouse from touch and t…
KoTeYkA23 Dec 12, 2023
cee6040
Add bindings for setting and getting emulation mouse from touch and t…
KoTeYkA23 Dec 12, 2023
731d756
Hide Node dock successfully on undo/redo and deletion
kevmorg Dec 2, 2023
06630ea
Add toaster notifications for import warning.
rakkarage Dec 5, 2023
c61c2a8
Navigation: Fix GCC 12.3 `-Wtype-limits` warnings
akien-mga Dec 12, 2023
b526cc4
Implement render info counters for the 2D renderer
clayjohn Dec 5, 2023
5d170bf
Add bindings for setting and getting emulation mouse from touch and t…
KoTeYkA23 Dec 12, 2023
bea3d24
Change suffix from m to px
Dec 12, 2023
f5e59f4
Add toaster notifications for import warning.
rakkarage Dec 5, 2023
947af9d
Merge branch 'master' of https://github.com/KoTeYkA23/godot into HEAD
KoTeYkA23 Dec 12, 2023
6fa438d
Change suffix from m to px
Dec 12, 2023
7735bfb
Navigation: Fix GCC 12.3 `-Wtype-limits` warnings
akien-mga Dec 12, 2023
40124cb
Add bindings for setting and getting emulation mouse from touch and t…
KoTeYkA23 Dec 12, 2023
f43879f
Add bindings for setting and getting emulation mouse from touch and t…
akien-mga Dec 12, 2023
b377bee
Merge branch 'master' of https://github.com/KoTeYkA23/godot
KoTeYkA23 Dec 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions core/input/input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 6 additions & 0 deletions doc/classes/Input.xml
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,12 @@
</method>
</methods>
<members>
<member name="emulate_mouse_from_touch" type="bool" setter="set_emulate_mouse_from_touch" getter="is_emulating_mouse_from_touch">
If [code]true[/code], sends mouse input events when tapping or swiping on the touchscreen.
</member>
<member name="emulate_touch_from_mouse" type="bool" setter="set_emulate_touch_from_mouse" getter="is_emulating_touch_from_mouse">
If [code]true[/code], sends touch input events when clicking or dragging the mouse.
</member>
<member name="mouse_mode" type="int" setter="set_mouse_mode" getter="get_mouse_mode" enum="Input.MouseMode">
Controls the mouse mode. See [enum MouseMode] for more information.
</member>
Expand Down
Loading