diff options
Diffstat (limited to 'core/os/input.cpp')
-rw-r--r-- | core/os/input.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/os/input.cpp b/core/os/input.cpp index 3712690cc1..4151c1b5a8 100644 --- a/core/os/input.cpp +++ b/core/os/input.cpp @@ -60,6 +60,7 @@ void Input::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_mouse_button_mask"),&Input::get_mouse_button_mask); ObjectTypeDB::bind_method(_MD("set_mouse_mode","mode"),&Input::set_mouse_mode); ObjectTypeDB::bind_method(_MD("get_mouse_mode"),&Input::get_mouse_mode); + ObjectTypeDB::bind_method(_MD("warp_mouse_pos","to"),&Input::warp_mouse_pos); BIND_CONSTANT( MOUSE_MODE_VISIBLE ); BIND_CONSTANT( MOUSE_MODE_HIDDEN ); @@ -304,6 +305,11 @@ int InputDefault::get_mouse_button_mask() const { return OS::get_singleton()->get_mouse_button_state(); } +void InputDefault::warp_mouse_pos(const Vector2& p_to) { + + OS::get_singleton()->warp_mouse_pos(p_to); +} + void InputDefault::iteration(float p_step) { |