diff options
| author | Juan Linietsky | 2014-09-19 21:01:41 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2014-09-19 21:01:41 -0300 |
| commit | 0a557f3bf50a0ccff444003c5adc8078862e52c7 (patch) | |
| tree | 64fef2b54fa65f895239e2384cc8164549099f74 /core/os/input.cpp | |
| parent | 549d344f0fef5e5748ded69b6a037698ff55f8bc (diff) | |
| download | godot-0a557f3bf50a0ccff444003c5adc8078862e52c7.tar.gz godot-0a557f3bf50a0ccff444003c5adc8078862e52c7.tar.zst godot-0a557f3bf50a0ccff444003c5adc8078862e52c7.zip | |
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 3712690cc..4151c1b5a 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) { |
