summaryrefslogtreecommitdiff
path: root/platform/javascript/display_server_javascript.cpp
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2021-03-30 18:35:08 -0400
committerAaron Franke <arnfranke@yahoo.com>2021-06-03 11:44:28 -0400
commit98aa3b669ee3425f40d6c3f3f96217bddf7b7137 (patch)
treeb353029af7e783ff1c7c054e1404a1e12a26facb /platform/javascript/display_server_javascript.cpp
parentf288a79482ad5272d872fdc84fdb64a228334d8e (diff)
Add MOUSE_MODE_CONFINED_HIDDEN
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Diffstat (limited to 'platform/javascript/display_server_javascript.cpp')
-rw-r--r--platform/javascript/display_server_javascript.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/platform/javascript/display_server_javascript.cpp b/platform/javascript/display_server_javascript.cpp
index cce1f8dca7..1cc05a2e19 100644
--- a/platform/javascript/display_server_javascript.cpp
+++ b/platform/javascript/display_server_javascript.cpp
@@ -407,9 +407,10 @@ void DisplayServerJavaScript::cursor_set_custom_image(const RES &p_cursor, Curso
// Mouse mode
void DisplayServerJavaScript::mouse_set_mode(MouseMode p_mode) {
- ERR_FAIL_COND_MSG(p_mode == MOUSE_MODE_CONFINED, "MOUSE_MODE_CONFINED is not supported for the HTML5 platform.");
- if (p_mode == mouse_get_mode())
+ ERR_FAIL_COND_MSG(p_mode == MOUSE_MODE_CONFINED || p_mode == MOUSE_MODE_CONFINED_HIDDEN, "MOUSE_MODE_CONFINED is not supported for the HTML5 platform.");
+ if (p_mode == mouse_get_mode()) {
return;
+ }
if (p_mode == MOUSE_MODE_VISIBLE) {
godot_js_display_cursor_set_visible(1);