add audio_manager and code refactoring
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://cpeyt1dgrtglc" path="res://core/radio/radio.tscn" id="1_8yomj"]
|
||||
[ext_resource type="Script" uid="uid://ew4b78u5tkiu" path="res://docs/museums/radio/museum_radio.gd" id="1_h5r8c"]
|
||||
[ext_resource type="AudioStream" uid="uid://70cc8she43re" path="res://docs/museums/radio/lofi_01.ogg" id="3_ltpvc"]
|
||||
[ext_resource type="PackedScene" uid="uid://caqf471x0kttc" path="res://core/audio/settings/settings_menu.tscn" id="4_8pw2j"]
|
||||
|
||||
[node name="MuseumRadio" type="Node3D" unique_id=204859062]
|
||||
script = ExtResource("1_h5r8c")
|
||||
@@ -19,45 +20,59 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Control" unique_id=2097365775]
|
||||
layout_mode = 0
|
||||
offset_left = 50.0
|
||||
offset_top = 50.0
|
||||
offset_right = 125.0
|
||||
offset_bottom = 221.0
|
||||
[node name="SettingsMenu" parent="Control" unique_id=1639777294 instance=ExtResource("4_8pw2j")]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
|
||||
[node name="Button_Play" type="Button" parent="Control/VBoxContainer" unique_id=1422696340]
|
||||
[node name="VBoxContainer2" type="VBoxContainer" parent="Control" unique_id=2092627240]
|
||||
layout_mode = 1
|
||||
anchors_preset = 9
|
||||
anchor_bottom = 1.0
|
||||
offset_right = 229.0
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="Control/VBoxContainer2" unique_id=2097365775]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Button_Play" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=1422696340]
|
||||
layout_mode = 2
|
||||
text = "Play"
|
||||
|
||||
[node name="Button_Pause_Resume" type="Button" parent="Control/VBoxContainer" unique_id=2016690081]
|
||||
[node name="Button_Pause_Resume" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=2016690081]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Pause"
|
||||
|
||||
[node name="Button_Stop" type="Button" parent="Control/VBoxContainer" unique_id=61861870]
|
||||
[node name="Button_Stop" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=61861870]
|
||||
layout_mode = 2
|
||||
text = "Stop"
|
||||
|
||||
[node name="Button_Next" type="Button" parent="Control/VBoxContainer" unique_id=957606385]
|
||||
[node name="Button_Next" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=957606385]
|
||||
layout_mode = 2
|
||||
text = "Next"
|
||||
|
||||
[node name="Button_Previous" type="Button" parent="Control/VBoxContainer" unique_id=929072518]
|
||||
[node name="Button_Previous" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=929072518]
|
||||
layout_mode = 2
|
||||
text = "Previous"
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="Control" unique_id=1558442050]
|
||||
layout_mode = 0
|
||||
offset_left = 50.0
|
||||
offset_top = 250.0
|
||||
offset_right = 400.0
|
||||
offset_bottom = 1027.0
|
||||
[node name="Button_SettingsMenu" type="Button" parent="Control/VBoxContainer2/VBoxContainer" unique_id=431867154]
|
||||
layout_mode = 2
|
||||
text = "SettingsMenu"
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="Control/PanelContainer" unique_id=7789304]
|
||||
[node name="PanelContainer" type="PanelContainer" parent="Control/VBoxContainer2" unique_id=1558442050]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="Control/VBoxContainer2/PanelContainer" unique_id=7789304]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="Control/PanelContainer/ScrollContainer" unique_id=2043293564]
|
||||
[node name="Label" type="Label" parent="Control/VBoxContainer2/PanelContainer/ScrollContainer" unique_id=2043293564]
|
||||
custom_minimum_size = Vector2(1, 1)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
@@ -81,8 +96,9 @@ Adjustable Parameters:
|
||||
- Current Track Index: Determines which song starts playing by default."
|
||||
autowrap_mode = 2
|
||||
|
||||
[connection signal="pressed" from="Control/VBoxContainer/Button_Play" to="." method="_on_button_play_pressed"]
|
||||
[connection signal="pressed" from="Control/VBoxContainer/Button_Pause_Resume" to="." method="_on_button_pause_pressed"]
|
||||
[connection signal="pressed" from="Control/VBoxContainer/Button_Stop" to="." method="_on_button_stop_pressed"]
|
||||
[connection signal="pressed" from="Control/VBoxContainer/Button_Next" to="." method="_on_button_next_pressed"]
|
||||
[connection signal="pressed" from="Control/VBoxContainer/Button_Previous" to="." method="_on_button_previous_pressed"]
|
||||
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_Play" to="." method="_on_button_play_pressed"]
|
||||
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_Pause_Resume" to="." method="_on_button_pause_pressed"]
|
||||
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_Stop" to="." method="_on_button_stop_pressed"]
|
||||
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_Next" to="." method="_on_button_next_pressed"]
|
||||
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_Previous" to="." method="_on_button_previous_pressed"]
|
||||
[connection signal="pressed" from="Control/VBoxContainer2/VBoxContainer/Button_SettingsMenu" to="." method="_on_button_settings_menu_pressed"]
|
||||
|
||||
Reference in New Issue
Block a user