-
-
Notifications
You must be signed in to change notification settings - Fork 20.8k
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
Conversation
…ouch from mouse functions
core/input/input.cpp
Outdated
ClassDB::bind_method(D_METHOD("set_emulate_mouse_from_touch", "p_emulate"), &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", "p_emulate"), &Input::set_emulate_touch_from_mouse); | ||
ClassDB::bind_method(D_METHOD("is_emulating_touch_from_mouse"), &Input::is_emulating_touch_from_mouse); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ClassDB::bind_method(D_METHOD("set_emulate_mouse_from_touch", "p_emulate"), &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", "p_emulate"), &Input::set_emulate_touch_from_mouse); | |
ClassDB::bind_method(D_METHOD("is_emulating_touch_from_mouse"), &Input::is_emulating_touch_from_mouse); | |
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are this property name only visual or this is reference to function properties?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should bind those as properties (ADD_PROPERTY
below, see how it's done for use_accumulated_input
), and then sync the class reference by running your compiled Godot with --doctool
to generate the documentation template (and fill the description).
…ouch from mouse functions modified: core/input/input.cpp modified: doc/classes/Input.xml
…ouch from mouse functions
…ouch from mouse functions
This provides information for the debug monitors
…ouch from mouse functions
…ouch from mouse functions
This provides information for the debug monitors
…ouch from mouse functions
…ouch from mouse functions
…ouch from mouse functions
Please use rebasing to update your branch instead of merge commits, you will need to squash your commits, see here |
I think i messed up something seriously, it will be easier to create new pr, sorry about that |
Make sure to open your new PR on a dedicated branch and make your changes there and not |
This will allow to set emulation of this input events in runtime, for example enabling it in game menu on touchscreen only device to allow use Control based buttons