summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/os/input.cpp3
-rw-r--r--core/os/input.h3
-rw-r--r--core/os/os.h3
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);