mirror of
https://github.com/godotengine/godot.git
synced 2025-10-22 17:33:33 +00:00
Add MOUSE_MODE_CONFINED_HIDDEN
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
This commit is contained in:
parent
f288a79482
commit
98aa3b669e
12 changed files with 69 additions and 37 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue