Client settings fix
This commit is contained in:
parent
f5f93104fc
commit
7aaa676f32
4 changed files with 27 additions and 34 deletions
|
|
@ -1,5 +1,6 @@
|
|||
extends Control
|
||||
|
||||
var cached_mouse_state: Input.MouseMode
|
||||
|
||||
func _on_check_button_toggled(toggled_on: bool) -> void:
|
||||
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN if toggled_on else DisplayServer.WINDOW_MODE_WINDOWED)
|
||||
|
|
@ -17,7 +18,11 @@ func _on_spin_box_value_changed(value: float) -> void:
|
|||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("menu_settings"):
|
||||
visible = not visible
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE if visible else Input.MOUSE_MODE_CAPTURED
|
||||
if visible:
|
||||
cached_mouse_state = Input.mouse_mode
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||
else:
|
||||
Input.mouse_mode = cached_mouse_state
|
||||
|
||||
|
||||
func _on_gameplay_main_slider_value_changed(value: float) -> void:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue