Player settings
This commit is contained in:
parent
de2736c701
commit
e8127ee423
8 changed files with 109 additions and 5 deletions
24
scripts/gui/client_settings_menu.gd
Normal file
24
scripts/gui/client_settings_menu.gd
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
extends Control
|
||||
|
||||
|
||||
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)
|
||||
|
||||
|
||||
func _on_h_slider_value_changed(value: float) -> void:
|
||||
$VBoxContainer/Sensitivity/SpinBox.set_value_no_signal(value)
|
||||
ClientSettings.SENSITIVITY = value
|
||||
|
||||
|
||||
func _on_spin_box_value_changed(value: float) -> void:
|
||||
$VBoxContainer/Sensitivity/HSlider.set_value_no_signal(value)
|
||||
ClientSettings.SENSITIVITY = value
|
||||
|
||||
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
|
||||
|
||||
|
||||
func _on_gameplay_main_slider_value_changed(value: float) -> void:
|
||||
AudioServer.set_bus_volume_linear(1,value)
|
||||
1
scripts/gui/client_settings_menu.gd.uid
Normal file
1
scripts/gui/client_settings_menu.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://ddi1alk8oyi1b
|
||||
Loading…
Add table
Add a link
Reference in a new issue