Files
Simplaudio/Scenes/main.tscn
T
2025-09-02 14:41:39 +02:00

312 lines
10 KiB
Plaintext

[gd_scene load_steps=18 format=3 uid="uid://mfcbf2sfino6"]
[ext_resource type="Texture2D" uid="uid://0jo87vtoeheu" path="res://Images/pole2.jpg" id="1_6bp64"]
[ext_resource type="Texture2D" uid="uid://df2e70jxwrmjs" path="res://Icons/BackOne.png" id="1_8gbba"]
[ext_resource type="Texture2D" uid="uid://0r1tx6l1lc6x" path="res://Icons/settingscog.png" id="2_344ge"]
[ext_resource type="Texture2D" uid="uid://daq8wnhtscpjl" path="res://Icons/Skip.png" id="2_bo1nx"]
[ext_resource type="Script" uid="uid://csihi5ila47ga" path="res://Scenes/Metadatatest.cs" id="2_fdnlq"]
[ext_resource type="Texture2D" uid="uid://ctb4s2nks73rx" path="res://Icons/Play.png" id="2_jjvhh"]
[ext_resource type="Texture2D" uid="uid://myq6n4bshduj" path="res://Icons/search.png" id="2_ynf5e"]
[ext_resource type="Script" uid="uid://bq55jftgugexl" path="res://Scripts/Context.cs" id="3_8gbba"]
[ext_resource type="Texture2D" uid="uid://38c8dfym0svn" path="res://Icons/Loop.png" id="4_21xkr"]
[ext_resource type="Script" uid="uid://dq3yj21reqk80" path="res://Scripts/SearchDisplay.cs" id="4_hptm8"]
[ext_resource type="Texture2D" uid="uid://cekkhyppj88xi" path="res://Icons/Headphones.png" id="4_kry3j"]
[ext_resource type="PackedScene" uid="uid://c21wc1bq2pnm" path="res://Scenes/song_display.tscn" id="5_d1ilt"]
[ext_resource type="Script" uid="uid://ci5h1wwbedkbt" path="res://Scripts/UIManager.cs" id="12_6iyac"]
[ext_resource type="Texture2D" uid="uid://ch8wymyxftkb3" path="res://Icons/Pause.png" id="14_jkdf5"]
[sub_resource type="GDScript" id="GDScript_bo1nx"]
resource_name = "OpenDirGlue"
script/source = "extends Button
@export var file_dialog: FileDialog
@export var Context:Node
func _ready() -> void:
file_dialog.dir_selected.connect(dirsel)
func _pressed() -> void:
file_dialog.show()
func dirsel(dir:String):
print(dir)
Context.call(\"LoadDirectory\",dir)
"
[sub_resource type="GDScript" id="GDScript_ynf5e"]
resource_name = "Toggle"
script/source = "extends Button
@export var searchbar:LineEdit
@export var showbutton:Button
func _ready() -> void:
toggled.connect(update)
func update(on:bool):
searchbar.visible = on == true
showbutton.visible = on != true
"
[sub_resource type="GDScript" id="GDScript_d1ilt"]
resource_name = "Slider"
script/source = "extends VSlider
func _process(delta: float) -> void:
AudioServer.set_bus_volume_db(AudioServer.get_bus_index(\"Music\"),linear_to_db(value))
"
[node name="Main" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Background" type="TextureRect" parent="."]
z_index = -2
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("1_6bp64")
expand_mode = 5
stretch_mode = 6
[node name="Padding" type="Control" parent="."]
layout_mode = 1
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 29.0
offset_top = 31.0
offset_right = -29.0
offset_bottom = -31.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("2_fdnlq")
[node name="VBoxContainer" type="VBoxContainer" parent="Padding"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Top" type="Control" parent="Padding/VBoxContainer"]
custom_minimum_size = Vector2(0, 42)
layout_mode = 2
[node name="HBoxContainer" type="HBoxContainer" parent="Padding/VBoxContainer/Top"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Button" type="Button" parent="Padding/VBoxContainer/Top/HBoxContainer" node_paths=PackedStringArray("file_dialog", "Context")]
layout_mode = 2
text = "Open dir"
script = SubResource("GDScript_bo1nx")
file_dialog = NodePath("../../../../../FileDialog")
Context = NodePath("../../../../../Context")
[node name="Control" type="HBoxContainer" parent="Padding/VBoxContainer/Top/HBoxContainer"]
clip_contents = true
layout_mode = 2
size_flags_horizontal = 3
alignment = 1
[node name="SearchBar" type="LineEdit" parent="Padding/VBoxContainer/Top/HBoxContainer/Control"]
visible = false
layout_mode = 2
size_flags_horizontal = 4
placeholder_text = "Search..."
max_length = 50
expand_to_text_length = true
[node name="ShowSongs" type="Button" parent="Padding/VBoxContainer/Top/HBoxContainer/Control"]
layout_mode = 2
size_flags_horizontal = 4
text = "show songs"
[node name="SearchToggle" type="Button" parent="Padding/VBoxContainer/Top/HBoxContainer/Control" node_paths=PackedStringArray("searchbar", "showbutton")]
custom_minimum_size = Vector2(42, 0)
layout_mode = 2
toggle_mode = true
icon = ExtResource("2_ynf5e")
alignment = 0
expand_icon = true
script = SubResource("GDScript_ynf5e")
searchbar = NodePath("../SearchBar")
showbutton = NodePath("../ShowSongs")
[node name="Settings" type="Button" parent="Padding/VBoxContainer/Top/HBoxContainer"]
custom_minimum_size = Vector2(42, 0)
layout_mode = 2
icon = ExtResource("2_344ge")
expand_icon = true
[node name="Center" type="Control" parent="Padding/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
[node name="SearchResults" type="Panel" parent="Padding/VBoxContainer/Center"]
custom_minimum_size = Vector2(200, 0)
layout_mode = 1
anchors_preset = -1
anchor_left = 0.28500003
anchor_right = 0.71500003
anchor_bottom = 0.93700004
offset_left = 0.20996094
offset_right = -0.21002197
offset_bottom = 0.12197876
grow_horizontal = 2
[node name="ScrollContainer" type="ScrollContainer" parent="Padding/VBoxContainer/Center/SearchResults"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
follow_focus = true
horizontal_scroll_mode = 0
[node name="VBoxContainer" type="VBoxContainer" parent="Padding/VBoxContainer/Center/SearchResults/ScrollContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
theme_override_constants/separation = 0
[node name="UpperMargin" type="Control" parent="Padding/VBoxContainer/Center/SearchResults/ScrollContainer/VBoxContainer"]
layout_mode = 2
[node name="SongContainer" type="VBoxContainer" parent="Padding/VBoxContainer/Center/SearchResults/ScrollContainer/VBoxContainer"]
layout_mode = 2
theme_override_constants/separation = 0
[node name="LowerMargin" type="Control" parent="Padding/VBoxContainer/Center/SearchResults/ScrollContainer/VBoxContainer"]
layout_mode = 2
[node name="Bottom" type="Control" parent="Padding/VBoxContainer"]
custom_minimum_size = Vector2(0, 42)
layout_mode = 2
[node name="HBoxContainer" type="HBoxContainer" parent="Padding/VBoxContainer/Bottom"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="BackButton" type="Button" parent="Padding/VBoxContainer/Bottom/HBoxContainer"]
custom_minimum_size = Vector2(42, 0)
layout_mode = 2
icon = ExtResource("1_8gbba")
expand_icon = true
[node name="PlayButton" type="Button" parent="Padding/VBoxContainer/Bottom/HBoxContainer"]
custom_minimum_size = Vector2(42, 0)
layout_mode = 2
toggle_mode = true
icon = ExtResource("2_jjvhh")
expand_icon = true
[node name="SkipButton" type="Button" parent="Padding/VBoxContainer/Bottom/HBoxContainer"]
custom_minimum_size = Vector2(42, 0)
layout_mode = 2
icon = ExtResource("2_bo1nx")
expand_icon = true
[node name="HSlider" type="HSlider" parent="Padding/VBoxContainer/Bottom/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
max_value = 1.0
step = 0.0010000000038417
tick_count = 5
ticks_position = 3
[node name="Loop" type="Button" parent="Padding/VBoxContainer/Bottom/HBoxContainer"]
custom_minimum_size = Vector2(42, 0)
layout_mode = 2
toggle_mode = true
icon = ExtResource("4_21xkr")
expand_icon = true
[node name="Shuffle" type="Button" parent="Padding/VBoxContainer/Bottom/HBoxContainer"]
layout_mode = 2
text = "shuffle"
[node name="Volume" type="Button" parent="Padding/VBoxContainer/Bottom/HBoxContainer"]
custom_minimum_size = Vector2(42, 0)
layout_mode = 2
icon = ExtResource("4_kry3j")
expand_icon = true
[node name="VolumeSlider" type="VSlider" parent="Padding/VBoxContainer/Bottom/HBoxContainer/Volume"]
custom_minimum_size = Vector2(0, 100)
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -9.0
offset_top = -50.0
offset_right = 7.0
offset_bottom = -42.0
grow_horizontal = 2
grow_vertical = 0
max_value = 1.0
step = 0.01000000000931322
value = 1.0
script = SubResource("GDScript_d1ilt")
[node name="FileDialog" type="FileDialog" parent="."]
oversampling_override = 1.0
title = "Open a Directory"
size = Vector2i(807, 360)
file_mode = 2
access = 2
use_native_dialog = true
[node name="Context" type="Node" parent="."]
script = ExtResource("3_8gbba")
[node name="Label" type="Label" parent="."]
layout_mode = 1
anchors_preset = -1
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -40.0
offset_top = -23.0
grow_horizontal = 0
grow_vertical = 0
text = "v2.0"
[node name="SearchDisplay" type="Node" parent="." node_paths=PackedStringArray("UpperMargin", "SongContainer", "LowerMargin", "Scroll")]
script = ExtResource("4_hptm8")
display = ExtResource("5_d1ilt")
UpperMargin = NodePath("../Padding/VBoxContainer/Center/SearchResults/ScrollContainer/VBoxContainer/UpperMargin")
SongContainer = NodePath("../Padding/VBoxContainer/Center/SearchResults/ScrollContainer/VBoxContainer/SongContainer")
LowerMargin = NodePath("../Padding/VBoxContainer/Center/SearchResults/ScrollContainer/VBoxContainer/LowerMargin")
Scroll = NodePath("../Padding/VBoxContainer/Center/SearchResults/ScrollContainer")
[node name="UiManager" type="Node" parent="." node_paths=PackedStringArray("PlayPauseButton", "ProgressIndicator", "SkipButton", "GoBackButton", "LoopButton", "RandomizeButton")]
script = ExtResource("12_6iyac")
PlayPauseButton = NodePath("../Padding/VBoxContainer/Bottom/HBoxContainer/PlayButton")
PauseImage = ExtResource("14_jkdf5")
PlayImage = ExtResource("2_jjvhh")
ProgressIndicator = NodePath("../Padding/VBoxContainer/Bottom/HBoxContainer/HSlider")
SkipButton = NodePath("../Padding/VBoxContainer/Bottom/HBoxContainer/SkipButton")
GoBackButton = NodePath("../Padding/VBoxContainer/Bottom/HBoxContainer/BackButton")
LoopButton = NodePath("../Padding/VBoxContainer/Bottom/HBoxContainer/Loop")
RandomizeButton = NodePath("../Padding/VBoxContainer/Bottom/HBoxContainer/Shuffle")