Global refactor
This commit is contained in:
parent
3868af29e3
commit
0589ca4e23
180 changed files with 249 additions and 401 deletions
|
|
@ -1,43 +0,0 @@
|
|||
extends Control
|
||||
|
||||
func _ready() -> void:
|
||||
hide()
|
||||
Session.session_started.connect(%LeaveButton.show)
|
||||
Session.session_ended.connect(%LeaveButton.hide)
|
||||
Lobby.lobby_created.connect(%StopSession.show)
|
||||
Lobby.lobby_closed.connect(%StopSession.hide)
|
||||
%SensitivitySlider.set_value_no_signal(ClientSettings.SENSITIVITY)
|
||||
%SensitivityBox.set_value_no_signal(ClientSettings.SENSITIVITY)
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("menu_settings"):
|
||||
visible = not visible
|
||||
if visible:
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||
else:
|
||||
if Session.session_started_flag:
|
||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
||||
else:
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||
|
||||
|
||||
func _on_gameplay_main_slider_value_changed(value: float) -> void:
|
||||
AudioServer.set_bus_volume_linear(1,value)
|
||||
|
||||
func _on_fullscreen_button_toggled(toggled_on: bool) -> void:
|
||||
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN if toggled_on else DisplayServer.WINDOW_MODE_WINDOWED)
|
||||
|
||||
func _on_sensitivity_slider_value_changed(value: float) -> void:
|
||||
%SensitivityBox.set_value_no_signal(value)
|
||||
ClientSettings.SENSITIVITY = value
|
||||
|
||||
func _on_sensitivity_box_value_changed(value: float) -> void:
|
||||
%SensitivitySlider.set_value_no_signal(value)
|
||||
ClientSettings.SENSITIVITY = value
|
||||
|
||||
func _on_leave_button_pressed() -> void:
|
||||
Session.quit_session()
|
||||
|
||||
func _on_stop_session_pressed() -> void:
|
||||
if multiplayer.is_server():
|
||||
Session.end_session()
|
||||
Loading…
Add table
Add a link
Reference in a new issue