diff options
author | Ilija Boshkov <ilija.boshkov@gmail.com> | 2017-01-25 19:21:41 +0100 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-01-25 19:21:41 +0100 |
commit | 1005a56e5a27fb7f491d280d5aff6fe88691365c (patch) | |
tree | 3b6ba52457db0287feed818955b3f917c5485b7b /core | |
parent | 4c28f35b2c6dacd30a0e10453af1bcd977de9342 (diff) |
Added focus tracking in X11 and Windows classes, added new confined mouse mode (#7162)
Diffstat (limited to 'core')
-rw-r--r-- | core/os/input.cpp | 3 | ||||
-rw-r--r-- | core/os/input.h | 3 | ||||
-rw-r--r-- | core/os/os.h | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/core/os/input.cpp b/core/os/input.cpp index e53aa82b13..4e7b037453 100644 --- a/core/os/input.cpp +++ b/core/os/input.cpp @@ -38,7 +38,7 @@ Input *Input::get_singleton() { } void Input::set_mouse_mode(MouseMode p_mode) { - ERR_FAIL_INDEX(p_mode,3); + ERR_FAIL_INDEX(p_mode,4); OS::get_singleton()->set_mouse_mode((OS::MouseMode)p_mode); } @@ -87,6 +87,7 @@ void Input::_bind_methods() { BIND_CONSTANT( MOUSE_MODE_VISIBLE ); BIND_CONSTANT( MOUSE_MODE_HIDDEN ); BIND_CONSTANT( MOUSE_MODE_CAPTURED ); + BIND_CONSTANT( MOUSE_MODE_CONFINED ); ADD_SIGNAL( MethodInfo("joy_connection_changed", PropertyInfo(Variant::INT, "index"), PropertyInfo(Variant::BOOL, "connected")) ); } diff --git a/core/os/input.h b/core/os/input.h index 82c7a80d3f..2cea154a50 100644 --- a/core/os/input.h +++ b/core/os/input.h @@ -47,7 +47,8 @@ public: enum MouseMode { MOUSE_MODE_VISIBLE, MOUSE_MODE_HIDDEN, - MOUSE_MODE_CAPTURED + MOUSE_MODE_CAPTURED, + MOUSE_MODE_CONFINED }; void set_mouse_mode(MouseMode p_mode); diff --git a/core/os/os.h b/core/os/os.h index ea03481a92..42c7c18b0c 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -131,7 +131,8 @@ public: enum MouseMode { MOUSE_MODE_VISIBLE, MOUSE_MODE_HIDDEN, - MOUSE_MODE_CAPTURED + MOUSE_MODE_CAPTURED, + MOUSE_MODE_CONFINED }; virtual void set_mouse_mode(MouseMode p_mode); |