Added settings for volume and mouse mode

This commit is contained in:
2024-05-06 12:36:05 +01:00
parent 2af3cb32eb
commit 38b7b8f0b8
15 changed files with 438 additions and 75 deletions

19
Settings.gd Normal file
View File

@@ -0,0 +1,19 @@
extends Node2D
func _ready() -> void:
$VBoxContainer/HBoxContainer/LeftPanel/Relative.button_pressed = Global.relative_mouse
$VBoxContainer/HBoxContainer/LeftPanel/Absolute.button_pressed = !Global.relative_mouse
$VBoxContainer/HBoxContainer/RightPanel/Volume.set_value_no_signal(Global.volume)
func _on_relative_pressed() -> void:
Global.relative_mouse = true
func _on_absolute_pressed() -> void:
Global.relative_mouse = false
func _on_exit_pressed() -> void:
get_tree().change_scene_to_file("res://Intro.tscn")
func _on_volume_drag_ended(value_changed: bool) -> void:
Global.volume = $VBoxContainer/HBoxContainer/RightPanel/Volume.value
$Boink.play()