implemented level select, options menu, different audio buses & sliders

This commit is contained in:
KingGurke 2023-10-02 11:43:44 +02:00
parent 17085c5148
commit f51914161e
14 changed files with 485 additions and 46 deletions

View file

@ -1,6 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://fqg6y7xp34u0"]
[gd_scene load_steps=4 format=3 uid="uid://fqg6y7xp34u0"]
[ext_resource type="Script" path="res://src/gui/menu/options.gd" id="1_0813x"]
[ext_resource type="Theme" uid="uid://dpktnl3r5wul1" path="res://src/gui/menu_theme.tres" id="1_stpo1"]
[ext_resource type="Script" path="res://src/gui/menu/volume_slider.gd" id="3_2vqm2"]
[node name="options" type="Control"]
layout_mode = 3
@ -9,4 +11,132 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_stpo1")
script = ExtResource("1_0813x")
[node name="Background" type="Panel" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -131.0
offset_top = -231.0
offset_right = 132.0
offset_bottom = 169.0
grow_horizontal = 2
grow_vertical = 2
[node name="Label" type="Label" parent="Background"]
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -52.0
offset_top = 24.0
offset_right = 52.0
offset_bottom = 50.0
grow_horizontal = 2
text = "OPTIONS"
horizontal_alignment = 1
[node name="VBoxContainer" type="VBoxContainer" parent="Background"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -102.0
offset_top = -84.0
offset_right = 102.0
offset_bottom = 120.0
grow_horizontal = 2
grow_vertical = 2
[node name="Label" type="Label" parent="Background/VBoxContainer"]
layout_mode = 2
text = "AUDIO"
horizontal_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="Background/VBoxContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="Background/VBoxContainer/HBoxContainer"]
custom_minimum_size = Vector2(65, 0)
layout_mode = 2
text = "MASTER"
[node name="MarginContainer" type="MarginContainer" parent="Background/VBoxContainer/HBoxContainer"]
layout_mode = 2
theme_override_constants/margin_top = 3
[node name="HSlider" type="HSlider" parent="Background/VBoxContainer/HBoxContainer/MarginContainer"]
custom_minimum_size = Vector2(125, 0)
layout_mode = 2
max_value = 1.0
step = 0.001
script = ExtResource("3_2vqm2")
bus_name = "Master"
[node name="HBoxContainer2" type="HBoxContainer" parent="Background/VBoxContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="Background/VBoxContainer/HBoxContainer2"]
custom_minimum_size = Vector2(65, 0)
layout_mode = 2
text = "MUSIC"
[node name="MarginContainer" type="MarginContainer" parent="Background/VBoxContainer/HBoxContainer2"]
layout_mode = 2
theme_override_constants/margin_top = 3
[node name="HSlider" type="HSlider" parent="Background/VBoxContainer/HBoxContainer2/MarginContainer"]
custom_minimum_size = Vector2(125, 0)
layout_mode = 2
max_value = 1.0
step = 0.001
script = ExtResource("3_2vqm2")
bus_name = "Music"
[node name="HBoxContainer3" type="HBoxContainer" parent="Background/VBoxContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="Background/VBoxContainer/HBoxContainer3"]
custom_minimum_size = Vector2(65, 0)
layout_mode = 2
text = "SFX"
[node name="MarginContainer" type="MarginContainer" parent="Background/VBoxContainer/HBoxContainer3"]
layout_mode = 2
theme_override_constants/margin_top = 3
[node name="HSlider" type="HSlider" parent="Background/VBoxContainer/HBoxContainer3/MarginContainer"]
custom_minimum_size = Vector2(125, 0)
layout_mode = 2
max_value = 1.0
step = 0.001
script = ExtResource("3_2vqm2")
bus_name = "Sfx"
[node name="BackButton" type="Button" parent="Background"]
custom_minimum_size = Vector2(120, 40)
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -60.0
offset_top = -64.0
offset_right = 60.0
offset_bottom = -24.0
grow_horizontal = 2
grow_vertical = 0
size_flags_horizontal = 4
size_flags_vertical = 8
focus_neighbor_bottom = NodePath("../StartButton")
text = "Back"
[connection signal="pressed" from="Background/BackButton" to="." method="_on_back_button_pressed"]