mirror of
https://github.com/godotengine/godot.git
synced 2025-10-25 02:43:29 +00:00
Merge pull request #63643 from aaronfranke/3.x-mouse-mode-ch
This commit is contained in:
commit
7dc8ec0c61
10 changed files with 43 additions and 26 deletions
|
|
@ -533,9 +533,10 @@ void OS_JavaScript::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_s
|
|||
}
|
||||
|
||||
void OS_JavaScript::set_mouse_mode(OS::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 == get_mouse_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 == get_mouse_mode()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (p_mode == MOUSE_MODE_VISIBLE) {
|
||||
godot_js_display_cursor_set_visible(1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue