Implemented Directory Reading

This commit is contained in:
Bucket Of Chicken
2025-08-29 16:31:19 +02:00
parent 38655756e3
commit 4f28182832
98 changed files with 259 additions and 4375 deletions
+3
View File
@@ -0,0 +1,3 @@
{
"godotTools.editorPath.godot4": "/home/bucket/Downloads/Godot_v4.5-beta5_mono_linux_x86_64/Godot_v4.5-beta5_mono_linux.x86_64"
}
+6
View File
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Download.png-6edabc13913011fcc1c474de846d5a9e
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
+6
View File
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Dropdown.png-f0021d4c0ded22eb7c63bcbc517eb8ad
compress/mode=1
compress/high_quality=false
compress/lossy_quality=1.0
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=1
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
+6
View File
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/File.png-4411e7b96437ffc88364c665e51b8d04.cte
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
+6
View File
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Headphones.png-5216505d06b86ae3755e2faf136684
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
+6
View File
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Loding.png-6d3c0733bbca79cc50961d85464a8b98.c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
+6
View File
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Logo.png-74a0629716e72ae40e6b8ec0af0a36d4.cte
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
+6
View File
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Logo2.png-100c0815408d11fe328d0658eac3e9f7.ct
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
+6
View File
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Loop.png-3a14373bdaaa66724c0d3e0e4930c783.cte
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
+6
View File
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/LoopPressed.png-4a3ff253d730f38bb12be6a28d229
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
+6
View File
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Pause.png-65652e6e56baf3539bef8ff5ed11c80f.ct
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
+6
View File
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Play.png-027e1a7ba14d3532475ac2beb7611718.cte
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
+6
View File
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/Skip.png-a3595e1eea6e30e9583829cd1e79191f.cte
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
+6
View File
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/X.png-62eed553c511eef879555263d706449c.ctex"]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
+6
View File
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/XSmall.png-3f5e03f6bae52e14377c330d561cf482.c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
+6
View File
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/gear.png-daf0471406e5a26bbc92ea97ba336a29.cte
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
+6
View File
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/search.png-e8eb6d389ef902d03141381229533272.c
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
+6
View File
@@ -18,6 +18,8 @@ dest_files=["res://.godot/imported/settingscog.png-1b51c867ad6363c7213609d4b59a5
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
@@ -25,6 +27,10 @@ mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
-1351
View File
File diff suppressed because it is too large Load Diff
-95
View File
@@ -1,95 +0,0 @@
[gd_scene load_steps=4 format=3 uid="uid://c33qaelwn46f4"]
[ext_resource type="Script" uid="uid://cs12qambyvou8" path="res://Scripts/playlist_display.gd" id="1_h0jh1"]
[ext_resource type="Texture2D" uid="uid://dwvy6crqhardn" path="res://Icons/Dropdown.png" id="2_im6ur"]
[sub_resource type="LabelSettings" id="LabelSettings_ky8oc"]
font_size = 12
font_color = Color(0.597176, 0.597176, 0.597176, 1)
[node name="PlaylistDisplay" type="Control"]
custom_minimum_size = Vector2(0, 67.92)
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = -910.0
offset_bottom = -727.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_h0jh1")
[node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
color = Color(0.439049, 0.439049, 0.439049, 0.298039)
[node name="HSplitContainer" type="HSplitContainer" parent="."]
layout_mode = 1
anchors_preset = -1
anchor_left = 0.0247678
anchor_top = 0.0882353
anchor_right = 0.981424
anchor_bottom = 0.897059
grow_horizontal = 2
grow_vertical = 2
split_offset = 310
dragger_visibility = 2
metadata/_edit_use_anchors_ = true
[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer"]
layout_mode = 2
[node name="Name" type="RichTextLabel" parent="HSplitContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 24.395)
layout_mode = 2
bbcode_enabled = true
text = "Name"
autowrap_mode = 0
[node name="Directory" type="Label" parent="HSplitContainer/VBoxContainer"]
layout_mode = 2
text = "Directory"
label_settings = SubResource("LabelSettings_ky8oc")
clip_text = true
[node name="HBoxContainer" type="HBoxContainer" parent="HSplitContainer"]
layout_mode = 2
[node name="PlayButton" type="Button" parent="HSplitContainer/HBoxContainer"]
custom_minimum_size = Vector2(70, 0)
layout_mode = 2
focus_mode = 0
text = "Play"
[node name="OptionsDropdown" type="MenuButton" parent="HSplitContainer/HBoxContainer"]
modulate = Color(0.724643, 0.724643, 0.724643, 1)
custom_minimum_size = Vector2(20.505, 0)
layout_mode = 2
icon = ExtResource("2_im6ur")
expand_icon = true
item_count = 2
popup/item_0/text = "Change Directory"
popup/item_1/text = "Delete"
popup/item_1/id = 1
[node name="FileDialog" type="FileDialog" parent="."]
title = "Open a Directory"
size = Vector2i(303, 180)
ok_button_text = "Select Current Folder"
file_mode = 2
access = 2
use_native_dialog = true
[node name="ConfirmationDialog" type="ConfirmationDialog" parent="."]
position = Vector2i(445, 275)
size = Vector2i(359, 100)
dialog_text = "Are you sure you want to delete the playlist?"
[connection signal="pressed" from="HSplitContainer/HBoxContainer/PlayButton" to="." method="_on_play_button_pressed"]
[connection signal="dir_selected" from="FileDialog" to="." method="_on_file_dialog_dir_selected"]
[connection signal="confirmed" from="ConfirmationDialog" to="." method="_on_confirmation_dialog_confirmed"]
-655
View File
@@ -1,655 +0,0 @@
[gd_scene load_steps=12 format=3 uid="uid://dqg674t6kun4e"]
[ext_resource type="Script" uid="uid://vnpslgl788du" path="res://Scripts/settings.gd" id="1_uaa7d"]
[ext_resource type="Script" uid="uid://kt7n1epi3ng8" path="res://Scripts/eq_settings.gd" id="2_1n4m6"]
[ext_resource type="Texture2D" uid="uid://1rstn6r2wisy" path="res://Icons/X.png" id="2_iuivb"]
[ext_resource type="Texture2D" uid="uid://pgij783wgbhn" path="res://Icons/File.png" id="2_jmen4"]
[ext_resource type="Script" uid="uid://cej7efsj2cyen" path="res://Scripts/language_button.gd" id="2_sfvul"]
[sub_resource type="LabelSettings" id="LabelSettings_ouq8m"]
font_size = 30
[sub_resource type="LabelSettings" id="LabelSettings_2bhor"]
font_size = 25
[sub_resource type="LabelSettings" id="LabelSettings_p55k3"]
font_size = 11
[sub_resource type="LabelSettings" id="LabelSettings_cwn10"]
font_size = 15
[sub_resource type="LabelSettings" id="LabelSettings_i51gs"]
font_size = 50
[sub_resource type="GDScript" id="GDScript_mjqtt"]
resource_name = "userdata"
script/source = "extends Button
func _pressed() -> void:
OS.shell_show_in_file_manager(ProjectSettings.globalize_path(\"user://\"))
"
[node name="SettingsMenuChild" type="Control"]
custom_minimum_size = Vector2(576, 493)
layout_mode = 3
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -288.0
offset_right = 288.0
offset_bottom = 493.0
grow_horizontal = 2
size_flags_vertical = 0
script = ExtResource("1_uaa7d")
[node name="ScrollContainer" type="ScrollContainer" parent="."]
custom_minimum_size = Vector2(576, 493)
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer"]
custom_minimum_size = Vector2(576, 493)
layout_mode = 2
size_flags_vertical = 0
[node name="SETTINGS" type="Label" parent="ScrollContainer/VBoxContainer"]
custom_minimum_size = Vector2(68.49, 25.94)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 3
text = "SETTINGS"
label_settings = SubResource("LabelSettings_ouq8m")
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="Seperator5" type="Control" parent="ScrollContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 16.07)
layout_mode = 2
[node name="THIRDPARTYAPPS" type="Label" parent="ScrollContainer/VBoxContainer"]
custom_minimum_size = Vector2(400, 26.975)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 3
text = "INTIGRATIONS"
label_settings = SubResource("LabelSettings_2bhor")
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="DiscordRichPresenceButton" type="CheckBox" parent="ScrollContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 0
focus_mode = 0
text = "DRPC"
[node name="disclaimer" type="Label" parent="ScrollContainer/VBoxContainer"]
custom_minimum_size = Vector2(229.895, 0)
layout_mode = 2
size_flags_horizontal = 0
text = "DRPC_NOTE"
label_settings = SubResource("LabelSettings_p55k3")
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="Seperator4" type="Control" parent="ScrollContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 16.07)
layout_mode = 2
[node name="Looks" type="Label" parent="ScrollContainer/VBoxContainer"]
custom_minimum_size = Vector2(400, 26.975)
layout_mode = 2
size_flags_vertical = 3
text = "LOOKS"
label_settings = SubResource("LabelSettings_2bhor")
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
uppercase = true
[node name="Seperator8" type="Control" parent="ScrollContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 16.07)
layout_mode = 2
[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "LANGUAGE"
[node name="LanguageButton" type="MenuButton" parent="ScrollContainer/VBoxContainer/HBoxContainer" node_paths=PackedStringArray("settings")]
custom_minimum_size = Vector2(50, 0)
layout_mode = 2
text = "SELECT"
flat = false
script = ExtResource("2_sfvul")
settings = NodePath("../../../..")
[node name="Seperator3" type="Control" parent="ScrollContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 16.07)
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer/VBoxContainer"]
layout_mode = 2
[node name="HBoxContainer2" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/VBoxContainer"]
layout_mode = 2
[node name="TextureRect" type="TextureRect" parent="ScrollContainer/VBoxContainer/VBoxContainer/HBoxContainer2"]
texture_filter = 1
custom_minimum_size = Vector2(15, 15)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("2_jmen4")
expand_mode = 3
[node name="BackroundDirLabel" type="Label" parent="ScrollContainer/VBoxContainer/VBoxContainer/HBoxContainer2"]
layout_mode = 2
size_flags_horizontal = 0
label_settings = SubResource("LabelSettings_cwn10")
[node name="HBoxContainer" type="HBoxContainer" parent="ScrollContainer/VBoxContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 0
[node name="SelectBG" type="Button" parent="ScrollContainer/VBoxContainer/VBoxContainer/HBoxContainer"]
custom_minimum_size = Vector2(0, 25.35)
layout_mode = 2
size_flags_horizontal = 4
text = "BS_SELECT"
[node name="ResetBG" type="Button" parent="ScrollContainer/VBoxContainer/VBoxContainer/HBoxContainer"]
custom_minimum_size = Vector2(0, 25.35)
layout_mode = 2
size_flags_horizontal = 4
text = "RESET_BG"
[node name="SelectBGDialog" type="FileDialog" parent="ScrollContainer/VBoxContainer"]
title = "Open a File"
size = Vector2i(324, 180)
transient = false
ok_button_text = "Open"
file_mode = 0
access = 2
filters = PackedStringArray("*.png", "*.jpg ", "*.jpeg", "*.gif", "*")
show_hidden_files = true
use_native_dialog = true
[node name="Seperator2" type="Control" parent="ScrollContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 16.07)
layout_mode = 2
[node name="FUN" type="Label" parent="ScrollContainer/VBoxContainer"]
custom_minimum_size = Vector2(400, 26.975)
layout_mode = 2
size_flags_vertical = 3
text = "SETTINGS_SOUND"
label_settings = SubResource("LabelSettings_2bhor")
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="Seperator" type="Control" parent="ScrollContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 16.07)
layout_mode = 2
[node name="PitchAdjustSettings" type="HSplitContainer" parent="ScrollContainer/VBoxContainer"]
custom_minimum_size = Vector2(328.985, 0)
layout_mode = 2
size_flags_horizontal = 0
split_offset = 200
dragger_visibility = 2
[node name="PitchSlider" type="HSlider" parent="ScrollContainer/VBoxContainer/PitchAdjustSettings"]
layout_mode = 2
size_flags_vertical = 4
focus_mode = 0
min_value = 0.25
max_value = 2.0
step = 0.05
value = 1.0
[node name="PitchAdjustSettings" type="HSplitContainer" parent="ScrollContainer/VBoxContainer/PitchAdjustSettings"]
custom_minimum_size = Vector2(130.38, 0)
layout_mode = 2
size_flags_horizontal = 4
split_offset = 995
dragger_visibility = 2
[node name="PitchValue" type="Label" parent="ScrollContainer/VBoxContainer/PitchAdjustSettings/PitchAdjustSettings"]
custom_minimum_size = Vector2(23.9, 7.51)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
text = "1.0"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="FUN" type="Label" parent="ScrollContainer/VBoxContainer/PitchAdjustSettings/PitchAdjustSettings"]
custom_minimum_size = Vector2(100.49, 7.51)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
text = "PITCH_SPEED"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="ReverbCheck" type="CheckBox" parent="ScrollContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 0
focus_mode = 0
text = "REVERB"
[node name="ReverbSettings" type="VBoxContainer" parent="ScrollContainer/VBoxContainer"]
visible = false
layout_mode = 2
[node name="SizeAdjustSettings" type="HSplitContainer" parent="ScrollContainer/VBoxContainer/ReverbSettings"]
custom_minimum_size = Vector2(328.985, 0)
layout_mode = 2
size_flags_horizontal = 0
split_offset = 200
dragger_visibility = 2
[node name="RoomSizeSlider" type="HSlider" parent="ScrollContainer/VBoxContainer/ReverbSettings/SizeAdjustSettings"]
layout_mode = 2
size_flags_vertical = 4
focus_mode = 0
max_value = 0.95
step = 0.05
value = 0.8
[node name="PitchAdjustSettings" type="HSplitContainer" parent="ScrollContainer/VBoxContainer/ReverbSettings/SizeAdjustSettings"]
custom_minimum_size = Vector2(130.38, 0)
layout_mode = 2
size_flags_horizontal = 4
split_offset = 995
dragger_visibility = 2
[node name="RoomSizeValue" type="Label" parent="ScrollContainer/VBoxContainer/ReverbSettings/SizeAdjustSettings/PitchAdjustSettings"]
custom_minimum_size = Vector2(23.9, 7.51)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
text = "1.0"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="FUN" type="Label" parent="ScrollContainer/VBoxContainer/ReverbSettings/SizeAdjustSettings/PitchAdjustSettings"]
custom_minimum_size = Vector2(94.52, 7.51)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
text = "ROOM_SIZE"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="DampeningAdjustSettings" type="HSplitContainer" parent="ScrollContainer/VBoxContainer/ReverbSettings"]
custom_minimum_size = Vector2(328.985, 0)
layout_mode = 2
size_flags_horizontal = 0
split_offset = 200
dragger_visibility = 2
[node name="DampeningSizeSlider" type="HSlider" parent="ScrollContainer/VBoxContainer/ReverbSettings/DampeningAdjustSettings"]
layout_mode = 2
size_flags_vertical = 4
focus_mode = 0
max_value = 0.95
step = 0.05
value = 0.8
[node name="DampaningAdjustSettings" type="HSplitContainer" parent="ScrollContainer/VBoxContainer/ReverbSettings/DampeningAdjustSettings"]
custom_minimum_size = Vector2(130.38, 0)
layout_mode = 2
size_flags_horizontal = 4
split_offset = 995
dragger_visibility = 2
[node name="DampeningValue" type="Label" parent="ScrollContainer/VBoxContainer/ReverbSettings/DampeningAdjustSettings/DampaningAdjustSettings"]
custom_minimum_size = Vector2(23.9, 7.51)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
text = "1.0"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="FUN" type="Label" parent="ScrollContainer/VBoxContainer/ReverbSettings/DampeningAdjustSettings/DampaningAdjustSettings"]
custom_minimum_size = Vector2(94.52, 7.51)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
text = "Damping"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="SpreadAdjustSettings2" type="HSplitContainer" parent="ScrollContainer/VBoxContainer/ReverbSettings"]
custom_minimum_size = Vector2(328.985, 0)
layout_mode = 2
size_flags_horizontal = 0
split_offset = 200
dragger_visibility = 2
[node name="SpreadSizeSlider" type="HSlider" parent="ScrollContainer/VBoxContainer/ReverbSettings/SpreadAdjustSettings2"]
layout_mode = 2
size_flags_vertical = 4
focus_mode = 0
max_value = 0.95
step = 0.05
value = 0.8
[node name="SpreadAdjustSettings" type="HSplitContainer" parent="ScrollContainer/VBoxContainer/ReverbSettings/SpreadAdjustSettings2"]
custom_minimum_size = Vector2(130.38, 0)
layout_mode = 2
size_flags_horizontal = 4
split_offset = 995
dragger_visibility = 2
[node name="SpreadValue" type="Label" parent="ScrollContainer/VBoxContainer/ReverbSettings/SpreadAdjustSettings2/SpreadAdjustSettings"]
custom_minimum_size = Vector2(23.9, 7.51)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
text = "1.0"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="FUN" type="Label" parent="ScrollContainer/VBoxContainer/ReverbSettings/SpreadAdjustSettings2/SpreadAdjustSettings"]
custom_minimum_size = Vector2(94.52, 7.51)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
text = "SPREAD"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="EQCheckBox" type="CheckBox" parent="ScrollContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 0
focus_mode = 0
text = "EQ"
[node name="EQSettings" type="VBoxContainer" parent="ScrollContainer/VBoxContainer"]
visible = false
layout_mode = 2
script = ExtResource("2_1n4m6")
[node name="CompressionCheck" type="CheckBox" parent="ScrollContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 0
focus_mode = 0
text = "COMPRESSION"
[node name="CompressionContainer" type="VBoxContainer" parent="ScrollContainer/VBoxContainer"]
visible = false
layout_mode = 2
[node name="ThresholdSettings" type="HSplitContainer" parent="ScrollContainer/VBoxContainer/CompressionContainer"]
custom_minimum_size = Vector2(328.985, 0)
layout_mode = 2
size_flags_horizontal = 0
split_offset = 200
dragger_visibility = 2
[node name="ThresholdSlider" type="HSlider" parent="ScrollContainer/VBoxContainer/CompressionContainer/ThresholdSettings"]
layout_mode = 2
size_flags_vertical = 4
focus_mode = 0
min_value = -60.0
max_value = 0.0
step = 0.5
value = -9.0
[node name="ThresholdSettings" type="HSplitContainer" parent="ScrollContainer/VBoxContainer/CompressionContainer/ThresholdSettings"]
custom_minimum_size = Vector2(130.38, 0)
layout_mode = 2
size_flags_horizontal = 4
split_offset = 995
dragger_visibility = 2
[node name="ThresholdValue" type="Label" parent="ScrollContainer/VBoxContainer/CompressionContainer/ThresholdSettings/ThresholdSettings"]
custom_minimum_size = Vector2(23.9, 7.51)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
text = "1.0"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="FUN" type="Label" parent="ScrollContainer/VBoxContainer/CompressionContainer/ThresholdSettings/ThresholdSettings"]
custom_minimum_size = Vector2(94.52, 7.51)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
text = "THRESHOLD"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="RatioSettings" type="HSplitContainer" parent="ScrollContainer/VBoxContainer/CompressionContainer"]
custom_minimum_size = Vector2(328.985, 0)
layout_mode = 2
size_flags_horizontal = 0
split_offset = 200
dragger_visibility = 2
[node name="RatioSlider" type="HSlider" parent="ScrollContainer/VBoxContainer/CompressionContainer/RatioSettings"]
layout_mode = 2
size_flags_vertical = 4
focus_mode = 0
min_value = 1.0
max_value = 48.0
value = 4.0
[node name="RatioSettings" type="HSplitContainer" parent="ScrollContainer/VBoxContainer/CompressionContainer/RatioSettings"]
custom_minimum_size = Vector2(130.38, 0)
layout_mode = 2
size_flags_horizontal = 4
split_offset = 995
dragger_visibility = 2
[node name="RatioValue" type="Label" parent="ScrollContainer/VBoxContainer/CompressionContainer/RatioSettings/RatioSettings"]
custom_minimum_size = Vector2(23.9, 7.51)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
text = "1.0"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="FUN" type="Label" parent="ScrollContainer/VBoxContainer/CompressionContainer/RatioSettings/RatioSettings"]
custom_minimum_size = Vector2(94.52, 7.51)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
text = "Ratio
"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="GainSettings" type="HSplitContainer" parent="ScrollContainer/VBoxContainer/CompressionContainer"]
custom_minimum_size = Vector2(328.985, 0)
layout_mode = 2
size_flags_horizontal = 0
split_offset = 200
dragger_visibility = 2
[node name="GainSlider" type="HSlider" parent="ScrollContainer/VBoxContainer/CompressionContainer/GainSettings"]
layout_mode = 2
size_flags_vertical = 4
focus_mode = 0
min_value = -10.0
max_value = 8.0
step = 0.5
[node name="GainSettings" type="HSplitContainer" parent="ScrollContainer/VBoxContainer/CompressionContainer/GainSettings"]
custom_minimum_size = Vector2(130.38, 0)
layout_mode = 2
size_flags_horizontal = 4
split_offset = 995
dragger_visibility = 2
[node name="GainValue" type="Label" parent="ScrollContainer/VBoxContainer/CompressionContainer/GainSettings/GainSettings"]
custom_minimum_size = Vector2(23.9, 7.51)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
text = "1.0"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="FUN" type="Label" parent="ScrollContainer/VBoxContainer/CompressionContainer/GainSettings/GainSettings"]
custom_minimum_size = Vector2(94.52, 7.51)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
text = "Gain
"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="Seperator6" type="Control" parent="ScrollContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 16.07)
layout_mode = 2
[node name="MISC" type="Label" parent="ScrollContainer/VBoxContainer"]
custom_minimum_size = Vector2(400, 26.975)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 3
text = "MISC"
label_settings = SubResource("LabelSettings_2bhor")
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="NowPlayingWindowButton" type="CheckBox" parent="ScrollContainer/VBoxContainer"]
layout_mode = 2
focus_mode = 0
text = "STREAMER_WINDOW"
[node name="NowPlayingInfo" type="Label" parent="ScrollContainer/VBoxContainer"]
custom_minimum_size = Vector2(229.895, 0)
layout_mode = 2
size_flags_horizontal = 0
text = "STREAMER_NOTE"
label_settings = SubResource("LabelSettings_p55k3")
vertical_alignment = 1
autowrap_mode = 2
[node name="Credits" type="VBoxContainer" parent="ScrollContainer/VBoxContainer"]
layout_mode = 2
[node name="Label" type="Label" parent="ScrollContainer/VBoxContainer/Credits"]
layout_mode = 2
size_flags_horizontal = 4
text = "CREDITS"
label_settings = SubResource("LabelSettings_i51gs")
[node name="Label5" type="LinkButton" parent="ScrollContainer/VBoxContainer/Credits"]
layout_mode = 2
size_flags_horizontal = 4
text = "Godot"
underline = 1
uri = "https://godotengine.org"
[node name="Label2" type="LinkButton" parent="ScrollContainer/VBoxContainer/Credits"]
layout_mode = 2
size_flags_horizontal = 4
text = "YT_DL"
underline = 1
uri = "https://github.com/Nolkaloid/godot-yt-dlp"
[node name="Label3" type="LinkButton" parent="ScrollContainer/VBoxContainer/Credits"]
layout_mode = 2
size_flags_horizontal = 4
text = "DRPCL"
underline = 1
uri = "https://github.com/vaporvee/discord-rpc-godot"
[node name="Label4" type="LinkButton" parent="ScrollContainer/VBoxContainer/Credits"]
layout_mode = 2
size_flags_horizontal = 4
text = "GDGIF"
underline = 1
uri = "https://github.com/BOTLANNER/godot-gif"
[node name="Seperator7" type="Control" parent="ScrollContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 16.07)
layout_mode = 2
[node name="TimeListening" type="Label" parent="ScrollContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 0
[node name="Userdata" type="Button" parent="ScrollContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
focus_mode = 0
text = "Open userdata"
script = SubResource("GDScript_mjqtt")
[node name="Reset" type="Button" parent="ScrollContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
focus_mode = 0
text = "RESET_SETTINGS"
[node name="Exit" type="Button" parent="."]
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -40.0
offset_bottom = 40.0
grow_horizontal = 0
size_flags_horizontal = 8
size_flags_vertical = 0
focus_mode = 0
icon = ExtResource("2_iuivb")
flat = true
expand_icon = true
[connection signal="toggled" from="ScrollContainer/VBoxContainer/DiscordRichPresenceButton" to="." method="_on_discord_rich_presence_button_toggled"]
[connection signal="pressed" from="ScrollContainer/VBoxContainer/VBoxContainer/HBoxContainer/SelectBG" to="." method="_on_select_bg_pressed"]
[connection signal="pressed" from="ScrollContainer/VBoxContainer/VBoxContainer/HBoxContainer/ResetBG" to="." method="_on_reset_bg_pressed"]
[connection signal="file_selected" from="ScrollContainer/VBoxContainer/SelectBGDialog" to="." method="_on_select_bg_dialog_file_selected"]
[connection signal="drag_ended" from="ScrollContainer/VBoxContainer/PitchAdjustSettings/PitchSlider" to="." method="_on_h_slider_drag_ended"]
[connection signal="toggled" from="ScrollContainer/VBoxContainer/ReverbCheck" to="." method="_on_reverb_check_toggled"]
[connection signal="drag_ended" from="ScrollContainer/VBoxContainer/ReverbSettings/SizeAdjustSettings/RoomSizeSlider" to="." method="_on_room_size_slider_drag_ended"]
[connection signal="drag_ended" from="ScrollContainer/VBoxContainer/ReverbSettings/DampeningAdjustSettings/DampeningSizeSlider" to="." method="_on_dampening_size_slider_drag_ended"]
[connection signal="drag_ended" from="ScrollContainer/VBoxContainer/ReverbSettings/SpreadAdjustSettings2/SpreadSizeSlider" to="." method="_on_spread_size_slider_drag_ended"]
[connection signal="toggled" from="ScrollContainer/VBoxContainer/EQCheckBox" to="." method="_on_eq_check_box_toggled"]
[connection signal="toggled" from="ScrollContainer/VBoxContainer/CompressionCheck" to="." method="_on_compression_check_toggled"]
[connection signal="drag_ended" from="ScrollContainer/VBoxContainer/CompressionContainer/ThresholdSettings/ThresholdSlider" to="." method="_on_threshold_slider_drag_ended"]
[connection signal="drag_ended" from="ScrollContainer/VBoxContainer/CompressionContainer/RatioSettings/RatioSlider" to="." method="_on_ratio_slider_drag_ended"]
[connection signal="drag_ended" from="ScrollContainer/VBoxContainer/CompressionContainer/GainSettings/GainSlider" to="." method="_on_gain_slider_drag_ended"]
[connection signal="toggled" from="ScrollContainer/VBoxContainer/NowPlayingWindowButton" to="." method="_on_now_playing_window_button_toggled"]
[connection signal="pressed" from="ScrollContainer/VBoxContainer/Reset" to="." method="_on_reset_pressed"]
[connection signal="pressed" from="ScrollContainer/VBoxContainer/Reset" to="ScrollContainer/VBoxContainer/EQSettings" method="_on_reset_pressed"]
[connection signal="pressed" from="Exit" to="." method="_on_exit_pressed"]
+58
View File
@@ -0,0 +1,58 @@
[gd_scene load_steps=2 format=3 uid="uid://mfcbf2sfino6"]
[ext_resource type="Script" uid="uid://c8bqyed2abyoy" path="res://Scripts/Test.cs" id="1_jjgbg"]
[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="Padding" type="Control" parent="."]
layout_mode = 1
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -547.0
offset_top = -293.0
offset_right = 547.0
offset_bottom = 293.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_jjgbg")
[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, 50)
layout_mode = 2
size_flags_vertical = 0
[node name="Control" type="Control" parent="Padding/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
[node name="Bottom" type="Control" parent="Padding/VBoxContainer"]
custom_minimum_size = Vector2(0, 50)
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="PlayButton" type="Button" parent="Padding/VBoxContainer/Bottom/HBoxContainer"]
layout_mode = 2
text = "play"
-143
View File
@@ -1,143 +0,0 @@
[gd_scene load_steps=10 format=3 uid="uid://n7cnapaftfse"]
[ext_resource type="Script" uid="uid://q2gdlr10ncnb" path="res://Scripts/playing_now_window.gd" id="1_f0rac"]
[ext_resource type="Texture2D" uid="uid://bp4ipephewcrn" path="res://SmoothEdges.png" id="2_haeb5"]
[ext_resource type="Texture2D" uid="uid://0jo87vtoeheu" path="res://Images/pole2.jpg" id="3_j8vo6"]
[sub_resource type="Gradient" id="Gradient_nf0dg"]
offsets = PackedFloat32Array(0.410072, 1)
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_kcqx3"]
gradient = SubResource("Gradient_nf0dg")
[sub_resource type="Theme" id="Theme_yr2ao"]
RichTextLabel/colors/font_shadow_color = Color(0.0768358, 0.0768358, 0.0768358, 0.52549)
RichTextLabel/constants/shadow_outline_size = 10
[sub_resource type="ImageTexture" id="ImageTexture_yr2ao"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_haeb5"]
bg_color = Color(0.28485, 0.28485, 0.28485, 1)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
expand_margin_top = 5.0
expand_margin_bottom = 5.0
shadow_color = Color(0, 0, 0, 0.443137)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_yr2ao"]
bg_color = Color(1, 1, 1, 1)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
expand_margin_top = 5.0
expand_margin_bottom = 5.0
[node name="PlayingNowWindow" type="Control" node_paths=PackedStringArray("SongImage", "SongNameLabel", "SongNameScroller", "SongAuthorScroller", "SongAuthorLabel", "slider")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource("1_f0rac")
SongImage = NodePath("ColorRect/TextureRect")
SongNameLabel = NodePath("VBoxContainer/ScrollContainer/SongName")
SongNameScroller = NodePath("VBoxContainer/ScrollContainer")
SongAuthorScroller = NodePath("VBoxContainer/ScrollContainer2")
SongAuthorLabel = NodePath("VBoxContainer/ScrollContainer2/SongAuthor")
slider = NodePath("VBoxContainer/Slider")
[node name="ColorRect" type="TextureRect" parent="."]
clip_children = 1
z_index = -1
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("2_haeb5")
expand_mode = 3
stretch_mode = 5
[node name="TextureRect" type="TextureRect" parent="ColorRect"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
texture = ExtResource("3_j8vo6")
expand_mode = 3
stretch_mode = 6
[node name="Sprite2D" type="Sprite2D" parent="."]
clip_children = 1
position = Vector2(-95.3115, -216)
texture = SubResource("GradientTexture2D_kcqx3")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
theme = SubResource("Theme_yr2ao")
alignment = 1
[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer"]
custom_minimum_size = Vector2(200, 25)
layout_mode = 2
size_flags_horizontal = 4
horizontal_scroll_mode = 3
vertical_scroll_mode = 0
[node name="SongName" type="RichTextLabel" parent="VBoxContainer/ScrollContainer"]
custom_minimum_size = Vector2(200, 30)
layout_mode = 2
size_flags_horizontal = 6
size_flags_vertical = 4
text = "Playing now TOOOOOOOOOOTT"
fit_content = true
scroll_active = false
autowrap_mode = 0
horizontal_alignment = 1
[node name="ScrollContainer2" type="ScrollContainer" parent="VBoxContainer"]
custom_minimum_size = Vector2(200, 25)
layout_mode = 2
size_flags_horizontal = 4
horizontal_scroll_mode = 3
vertical_scroll_mode = 0
[node name="SongAuthor" type="RichTextLabel" parent="VBoxContainer/ScrollContainer2"]
custom_minimum_size = Vector2(200, 30)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
text = "from protein ribosome"
autowrap_mode = 0
horizontal_alignment = 1
visible_characters_behavior = 3
[node name="Slider" type="HSlider" parent="VBoxContainer"]
custom_minimum_size = Vector2(120, 0)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
theme_override_icons/grabber_disabled = SubResource("ImageTexture_yr2ao")
theme_override_styles/slider = SubResource("StyleBoxFlat_haeb5")
theme_override_styles/grabber_area = SubResource("StyleBoxFlat_yr2ao")
max_value = 1000.0
value = 500.0
editable = false
scrollable = false
-53
View File
@@ -1,53 +0,0 @@
[gd_scene load_steps=3 format=3 uid="uid://ctqcbjrmxaqsk"]
[ext_resource type="Script" uid="uid://c3aaxhp0oim08" path="res://Scripts/search_item.gd" id="1_j4126"]
[ext_resource type="Texture2D" uid="uid://dwvy6crqhardn" path="res://Icons/Dropdown.png" id="2_hicj1"]
[node name="SearchItem" type="Control"]
custom_minimum_size = Vector2(0, 30)
layout_mode = 3
anchors_preset = 10
anchor_right = 1.0
grow_horizontal = 2
size_flags_horizontal = 3
size_flags_vertical = 4
script = ExtResource("1_j4126")
[node name="HBoxContainer" type="HBoxContainer" parent="."]
custom_minimum_size = Vector2(200, 32)
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
alignment = 1
[node name="Songname" type="Button" parent="HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 0
flat = true
alignment = 0
text_overrun_behavior = 1
clip_text = true
[node name="Dropdown" type="Button" parent="HBoxContainer"]
custom_minimum_size = Vector2(20, 0)
layout_mode = 2
tooltip_text = "delete song from hard-drive"
focus_mode = 0
icon = ExtResource("2_hicj1")
flat = true
icon_alignment = 1
expand_icon = true
[node name="PopupMenu" type="PopupMenu" parent="."]
item_count = 2
item_0/text = "DELETE"
item_0/id = 0
item_1/text = "open source"
item_1/id = 1
[connection signal="pressed" from="HBoxContainer/Songname" to="." method="_on_songname_pressed"]
[connection signal="pressed" from="HBoxContainer/Dropdown" to="." method="_on_dropdown_pressed"]
-42
View File
@@ -1,42 +0,0 @@
[gd_scene load_steps=2 format=3 uid="uid://bel6i6wdbexw4"]
[ext_resource type="Script" uid="uid://d0hvudugo3d37" path="res://Scripts/search_results.gd" id="1_mcn1o"]
[node name="SearchResults" type="Control"]
layout_mode = 3
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -311.5
offset_right = 311.5
offset_bottom = 300.0
grow_horizontal = 2
script = ExtResource("1_mcn1o")
[node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
color = Color(0.14902, 0.14902, 0.14902, 1)
[node name="Control" type="ScrollContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
follow_focus = true
horizontal_scroll_mode = 0
[node name="ItemContainer" type="VBoxContainer" parent="Control"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
-20
View File
@@ -1,20 +0,0 @@
shader_type canvas_item;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
vec2 animatedUV;
animatedUV.x = (sin(UV.x + (TIME))/2.0)+0.5;
animatedUV.y = (sin(UV.y + (TIME+(PI/2.0)))/2.0)+0.5;
float color1 = 1.0 *animatedUV.x;
float color2 = 1.0 *animatedUV.y;
COLOR = vec4((color1*0.7)+(color2*0.3),(color1*0.5)+(color2*0.5),(color1*0.3)+(color2*0.7),1);
}
//void light() {
// Called for every pixel for every light affecting the CanvasItem.
// Uncomment to replace the default light processing function with this one.
//}
-1
View File
@@ -1 +0,0 @@
uid://dgwslfj43mu1y
+7
View File
@@ -0,0 +1,7 @@
using Godot;
using System;
public partial class Context : Node
{
String[] Songs;
}
+1
View File
@@ -0,0 +1 @@
uid://bq55jftgugexl
-17
View File
@@ -1,17 +0,0 @@
shader_type canvas_item;
uniform sampler2D dissolve;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
vec4 tex = texture(dissolve,UV);
COLOR.a = tex.a;
}
//void light() {
// Called for every pixel for every light affecting the CanvasItem.
// Uncomment to replace the default light processing function with this one.
//}
-1
View File
@@ -1 +0,0 @@
uid://cv5aoaprqfuhx
-14
View File
@@ -1,14 +0,0 @@
extends ColorRect
@onready var StandardColor = color
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
if get_parent().is_hovered():
color = StandardColor.lightened(0.3)
else:
color = StandardColor
-1
View File
@@ -1 +0,0 @@
uid://cf1rsngucr7e2
+40
View File
@@ -0,0 +1,40 @@
using System;
using System.Collections;
using System.IO;
using System.Linq;
using Godot;
using TagLib.Riff;
public class Song{
public String Name;
public String[] Artists;
public String Album;
public float Length;
public String Directory;
}
public class DirectoryManager{
public Song[] LoadDirectory(String Path){
System.Collections.Generic.IEnumerable<string> Files = Directory.EnumerateFiles(Path);
Song[] Songs = [];
foreach (String file in Files){
if (!(file.EndsWith(".mp3") || file.EndsWith(".ogg") || file.EndsWith(".wav"))){
continue;
}
var tfile = TagLib.File.Create(file);
Song song = new();
song.Album = tfile.Tag.Album;
song.Artists = tfile.Tag.Performers;
song.Name = tfile.Tag.Title;
song.Length = tfile.Length;
song.Directory = file;
GD.Print("File Valid, file path ",tfile.Tag.Title);
Songs.Append(song);
//if (file.EndsWith(".mp3"))
}
return [];
}
}
+1
View File
@@ -0,0 +1 @@
uid://d11mq4j0hupmu
-20
View File
@@ -1,20 +0,0 @@
shader_type canvas_item;
uniform float intensity;
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
vec4 as = texture(screen_texture,SCREEN_UV);
vec4 a2s = texture(TEXTURE,UV);
vec4 fart = a2s * (0.1 + as.brga);
COLOR = fart * intensity;
}
//void light() {
// Called for every pixel for every light affecting the CanvasItem.
// Uncomment to replace the default light processing function with this one.
//}
-1
View File
@@ -1 +0,0 @@
uid://b8g2xx06g626m
-11
View File
@@ -1,11 +0,0 @@
extends Sprite2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
rotation_degrees += 90 * delta * 2
-1
View File
@@ -1 +0,0 @@
uid://bx75h6xic1hi7
+14
View File
@@ -0,0 +1,14 @@
using Godot;
using System;
using System.Diagnostics;
using TagLib;
public partial class Test : Node
{
public override void _Ready()
{
base._Ready();
DirectoryManager manager = new();
manager.LoadDirectory("/run/media/bucket/Old Linux Drive/MainExternalBackup/Music/");
}
}
+1
View File
@@ -0,0 +1 @@
uid://c8bqyed2abyoy
-38
View File
@@ -1,38 +0,0 @@
extends Control
@onready var birthday_particles: GPUParticles2D = $BirthdayParticles
@onready var audio_stream_player: AudioStreamPlayer = $AudioStreamPlayer
@onready var birthday_happy: Label = $"../BirthdayHappy"
@export var opacitycurve:Curve
var opacity:float = 1
var awaitingJumpscare:bool
var IsFocused:bool
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
birthday_happy.hide()
var bday:bool
if Time.get_datetime_dict_from_system().day == 9:
if Time.get_datetime_dict_from_system().month == 9:
await get_tree().create_timer(0.2).timeout
awaitingJumpscare = true
bday = true
func _notification(what):
if what == get_tree().NOTIFICATION_APPLICATION_FOCUS_IN:
IsFocused = true
if what == get_tree().NOTIFICATION_APPLICATION_FOCUS_OUT:
IsFocused = false
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
if awaitingJumpscare && IsFocused:
birthday_happy.show()
awaitingJumpscare = false
birthday_particles.emitting = true
audio_stream_player.play()
if !awaitingJumpscare:
opacity -= delta/5
birthday_happy.modulate.a = opacitycurve.sample_baked(opacity)
if opacity <= 0.0:
process_mode = ProcessMode.PROCESS_MODE_DISABLED
-1
View File
@@ -1 +0,0 @@
uid://n3koklp0funr
-28
View File
@@ -1,28 +0,0 @@
extends Sprite2D
class_name Cover
@onready var MusiMet : MusicMeta = MusicMeta.new()
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
if texture != null:
var relation:float = (float(texture.get_width()) / texture.get_height())
print(" relation " + str(texture.get_width()) + " " + str(texture.get_height()))
print(relation)
scale.x = 400.0 / float(texture.get_width())
scale.y = 400.0 / float(texture.get_height() * relation)
position.x = float(texture.get_width() * scale.x) / 2
position.y = -float(texture.get_height() * scale.y) / 2
func ChangeCover(AudioFile:AudioStreamMP3):
texture = MusiMet.get_mp3_metadata(AudioFile).cover
if texture != null:
var relation:float = (float(texture.get_width()) / texture.get_height())
print(" relation " + str(texture.get_width()) + " " + str(texture.get_height()))
print(relation)
scale.x = 400.0 / float(texture.get_width())
scale.y = 400.0 / float(texture.get_height() * relation)
position.x = float(texture.get_width() * scale.x) / 2
position.y = -float(texture.get_height() * scale.y) / 2
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
-1
View File
@@ -1 +0,0 @@
uid://dg68hvw773xu6
-94
View File
@@ -1,94 +0,0 @@
extends Control
@onready var good_indicator: Label = $ScrollContainer/VBoxContainer/GoodIndicator
@onready var create_playlist_button: Button = $ScrollContainer/VBoxContainer/CreatePlaylistButton
@onready var file_dialog: FileDialog = $FileDialog
@onready var current_directory: Label = $ScrollContainer/VBoxContainer/CurrentDirectory
@onready var playlist_name: LineEdit = $ScrollContainer/VBoxContainer/PlaylistName
@onready var playlists_holder: VBoxContainer = $"../PlaylistPanelHolder/PlaylistsPanel/PlaylistsContainer/VBoxContainer/PlaylistsHolder"
const PLAYLIST_DISPLAY = preload("res://Scenes/PlaylistDisplay.tscn")
@onready var Parent:MainScene = owner
var NameValid:bool
var DirValid:bool
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func IsValid():
if NameValid:
if DirValid:
create_playlist_button.disabled = false
else:
create_playlist_button.disabled = true
else:
create_playlist_button.disabled = true
func _on_playlist_name_text_changed(new_text: String) -> void:
#elif new_text.unicode_at()
if !Parent.Playlists.has(new_text):
if new_text != "":
good_indicator.text = tr("NAME_VALID")
good_indicator.label_settings.font_color = Color(0,1,0,1)
NameValid =true
else:
good_indicator.text = tr("NAME_EMPTY")
good_indicator.label_settings.font_color = Color(1,0,0,1)
NameValid = false
else:
good_indicator.text = tr("NAME_USED")
good_indicator.label_settings.font_color = Color(1,0,0,1)
NameValid = false
IsValid()
func _on_select_dir_button_pressed() -> void:
file_dialog.show()
print(get_stack())
func _on_file_dialog_dir_selected(dir: String) -> void:
if dir != "":
DirValid = true
else:
DirValid = false
current_directory.text = dir
IsValid()
func ResetToDefault():
playlist_name.clear()
good_indicator.text = ""
good_indicator.label_settings.font_color = Color(1,1,1,1)
NameValid = false
create_playlist_button.disabled = true
func _on_create_playlist_button_pressed() -> void:
Parent.PlaylistsLocation[playlist_name.text] = current_directory.text
var Access = DirAccess.open(current_directory.text)
if Access != null:
@warning_ignore("static_called_on_instance")
var Read:Array = Access.get_files_at(current_directory.text)
var songs:Array
var WavDisclaimer:bool
for song:String in Read:
if song.contains(".mp3"):
songs.append(song)
Parent.Playlists[playlist_name.text] = songs
else:
Parent.Playlists[playlist_name.text] = []
var child = PLAYLIST_DISPLAY.instantiate()
child.PlaylistName = playlist_name.text
child.PlaylistLocation = Parent.PlaylistsLocation[playlist_name.text]
child.PlaylistSongs = Parent.Playlists[playlist_name.text]
playlists_holder.add_child(child)
hide()
ResetToDefault()
func _on_close_button_pressed() -> void:
hide()
-1
View File
@@ -1 +0,0 @@
uid://bsnt1irskti8d
-17
View File
@@ -1,17 +0,0 @@
extends Button
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
#await get_tree().create_timer(0.3).timeout
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_toggled(toggled_on: bool) -> void:
owner.DiscordRichPresenceEnabled = toggled_on
owner.Parent.SaveEverything()
-1
View File
@@ -1 +0,0 @@
uid://dl37gwyodonea
-69
View File
@@ -1,69 +0,0 @@
extends VBoxContainer
var HzDec = {0:"32 Hz",
1:"100 Hz",
2:"320 Hz",
3:"1000 Hz",
4:"3200 Hz",
5:"10000 Hz"}
var gainValueLabels:Array = []
var gainValueSlider:Array = []
@onready var eq_check_box: CheckBox = $"../EQCheckBox"
@onready var EQA:AudioEffectEQ6 = AudioServer.get_bus_effect(AudioServer.get_bus_index("Music"),1)
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
for band in EQA.get_band_count():
var slider:HSlider = HSlider.new()
slider.min_value = -100
slider.max_value = 20
slider.custom_minimum_size = Vector2(200,0)
slider.name = str(band)
slider.value_changed.connect(valueChanged.bind(slider))
var label:Label = Label.new()
label.text = HzDec.get(band)
var label2:Label = Label.new()
label2.text = " 0 "
var seperator:HSplitContainer = HSplitContainer.new()
var seperator2:HSplitContainer = HSplitContainer.new()
seperator.dragger_visibility = SplitContainer.DRAGGER_HIDDEN_COLLAPSED
seperator2.dragger_visibility = SplitContainer.DRAGGER_HIDDEN_COLLAPSED
add_child(seperator)
seperator.size_flags_horizontal = Control.SIZE_SHRINK_BEGIN
seperator.split_offset = 200
seperator.clamp_split_offset()
seperator.add_child(slider)
gainValueSlider.append(slider)
seperator.add_child(seperator2)
seperator2.add_child(label2)
gainValueLabels.append(label2)
seperator2.add_child(label)
func valueChanged(value,slider):
var idx = slider.name.to_int()
print(idx)
print(gainValueLabels)
EQA.set_band_gain_db(idx,value)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
for band in EQA.get_band_count():
gainValueLabels[band].text = str(" " + str(EQA.get_band_gain_db(band)) + " db ")
func _on_reset_pressed() -> void:
for band in EQA.get_band_count():
EQA.set_band_gain_db(band,0)
gainValueSlider[band].value = 0
eq_check_box.button_pressed = false
gainValueLabels[band].text = str(" " + str(EQA.get_band_gain_db(band)) + " db ")
-1
View File
@@ -1 +0,0 @@
uid://kt7n1epi3ng8
-15
View File
@@ -1,15 +0,0 @@
extends Button
@export var Open:String
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
func _pressed() -> void:
OS.shell_open(Open)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
-1
View File
@@ -1 +0,0 @@
uid://bn0iqqmor3b2b
-14
View File
@@ -1,14 +0,0 @@
extends MenuButton
@export var settings:Settings
func _ready() -> void:
for trans_language in TranslationServer.get_loaded_locales():
get_popup().add_item(trans_language)
get_popup().id_pressed.connect(got_pressed)
func got_pressed(id:int) -> void:
settings.Parent.overridden_locale = get_popup().get_item_text(id)
TranslationServer.set_locale(get_popup().get_item_text(id))
settings.Parent.SaveEverything()
-1
View File
@@ -1 +0,0 @@
uid://cej7efsj2cyen
-29
View File
@@ -1,29 +0,0 @@
extends Control
@onready var continue_anyways: Button = $VBoxContainer/HBoxContainer/ContinueAnyways
@onready var contact: Button = $VBoxContainer/HBoxContainer/Contact
@onready var failed_audio_cue: AudioStreamPlayer = $FailedAudioCue
@onready var confirmation_dialog: ConfirmationDialog = $ConfirmationDialog
func Show():
failed_audio_cue.play()
show()
continue_anyways.pressed.connect(confirmation_dialog.show)
confirmation_dialog.confirmed.connect(Confiremed)
contact.pressed.connect(Contact)
func Confiremed():
owner.LoadingSaveFailed = false
hide()
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
hide()
func Contact():
print("Contact pressed")
OS.shell_open("https://notdraimdev.github.io/SimplSite/Contact.html")
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
-1
View File
@@ -1 +0,0 @@
uid://cbdcs7oie12g5
-705
View File
@@ -1,705 +0,0 @@
class_name MainScene
extends Control
static var instance:MainScene
@onready var file_dialog: FileDialog = $FileDialog
@onready var music_player: AudioStreamPlayer = $MusicPlayer
@onready var randomize_list: Button = $RandomizeList
@onready var play_list: Button = $playList
@onready var current_progress: HSlider = $CurrentProgress
@onready var volume_slider: VSlider = $VolumeSlider
@onready var skip: Button = $Skip
@onready var go_back: Button = $GoBack
@onready var song_name: Label = $SongName
@onready var loop: Button = $Loop
@onready var time_listening_song: Label = $TimeListeningSong
@onready var cover: Cover = $CoverHolder/Cover
@onready var wav_disclaimer: AcceptDialog = $WavDisclaimer
@onready var youtube_menu_holder: Control = $YoutubeMenuHolder
@onready var youtube_menu: Control = $"YoutubeMenuHolder/Youtube menu"
@onready var yt_link: LineEdit = $"YoutubeMenuHolder/Youtube menu/YTLink"
@onready var yt_download: Button = $"YoutubeMenuHolder/Youtube menu/YTDownload"
@onready var loading_img: Sprite2D = $"YoutubeMenuHolder/Youtube menu/LoadingIMG"
@onready var songs_menu: Button = $SongsMenu
@onready var version: Label = $Version
@onready var paused_indicator: TextureRect = $PausedIndicator
@onready var settings_menu_child: Settings = $SettingsHolder/SettingsPopup/SettingsMenuChild
@onready var artist_name: Label = $ArtistName
@onready var user_bg: TextureRect = $UserBG
@onready var playlists_holder: VBoxContainer = $PlaylistPanelHolder/PlaylistsPanel/PlaylistsContainer/VBoxContainer/PlaylistsHolder
@onready var play_all: Button = $PlaylistPanelHolder/PlaylistsPanel/PlaylistsContainer/VBoxContainer/HBoxContainer/PlayAll
@onready var album_name: Label = $Album
@onready var playlist_or_song: ConfirmationDialog = $PlaylistOrSong
@onready var search_results: SearchResults = $SearchResults
@onready var delete_confirm: ConfirmationDialog = $deleteConfirm
@onready var search_bar: LineEdit = $SearchBar
@onready var playing_now: Window = $PlayingNow
@export var overridden_locale:String
@onready var playing_now_window: Control = $PlayingNow/PlayingNowWindow
var DiscordUsername:String
const PLAYLIST_DISPLAY = preload("res://Scenes/PlaylistDisplay.tscn")
const PAUSE = preload("res://Icons/Pause.png")
const PLAY = preload("res://Icons/Play.png")
var OpenedSong:String = ""
var CurrentIDX:int
var CurrentSongLenth:float
var CurrentDir:String
var textSongs:Array
var Randomized:bool
var LoopingSong:bool
var Paused:bool
var UpdateProgressSlider:bool = true
var ShowInstallAlerts:bool = false
var ReactivateLoop:bool
var SeenWAVDisclaimer:bool
var TimeSpentListening:float
var DiscordRichPresenceEnabled:bool = false
var SplashStrings:Array
var SaveInterval:float = 11.2
var currentSaveTime:float = 0.4
var CurrentPausedIndicatorShaderIntensity:float
var CurrentCustomBackroundImageDirectory:String
var Playlists:Dictionary = {}
var PlaylistsLocation:Dictionary
var BackroundSetup:bool
var CurrentPlaylist:String
var PlayAllLists:bool
var UsingPlayingNow:bool
@export var LoopPressed:Texture2D
@export var LoopNotPressed:Texture2D
signal ContinueDelete
var deleteSong:bool
signal SongChanged
var currentSongName:String
var currentArtistName:String
var currentAlbumName:String
var LoadingSaveFailed:bool = true
@onready var loading_failed_screen: Control = $LoadingFailedScreen
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
instance = self
playing_now.visible = false
get_tree().root.min_size = Vector2(850,492)
current_progress.drag_ended.connect(SongDragStopped)
current_progress.drag_started.connect(SongDragStarted)
loop.pressed.connect(LoopSong)
file_dialog.dir_selected.connect(DirectorySelected)
randomize_list.pressed.connect(Randomize)
play_list.pressed.connect(PlaySongs)
volume_slider.value_changed.connect(SetVolume)
skip.pressed.connect(Skip)
go_back.pressed.connect(GoBack)
search_results.index_pressed.connect(SetSong)
search_results.song_deleted.connect(deletesong)
var Strin:String
var data:Dictionary
var save = loadUserdata()
if save != {}:
data = save
loadPlaylists()
if Strin.is_empty():
if !Playlists.is_empty():
PlaylistSelected(Playlists.keys()[0],PlaylistsLocation[Playlists.keys()[0]])
#CurrentPlaylist = Playlists.keys()[0]
#CurrentDir = PlaylistsLocation[Playlists.keys()[0]]
for Playlist in Playlists.keys():
var child = PLAYLIST_DISPLAY.instantiate(PackedScene.GEN_EDIT_STATE_DISABLED)
if PlaylistsLocation.has(Playlist):
if PlaylistsLocation[Playlist] is String:
child.PlaylistLocation = PlaylistsLocation[Playlist]
else:
print("PLAYLIST LOCATION: " + str(PlaylistsLocation[Playlist]))
child.PlaylistName = Playlist
if Playlists.has(Playlist):
if Playlists[Playlist] is String:
child.PlaylistSongs = Playlists[Playlist]
playlists_holder.add_child(child)
if data != null:
if data.has("Volume"):
print(data["Volume"])
SetVolume(data["Volume"])
if data.has("CurrIDX"):
CurrentIDX = int(data["CurrIDX"]) % textSongs.size() if textSongs.size() !=0 and int(data["CurrIDX"]) != 0 else 0
if data.has("Randomized"):
Randomize()
if data.has("Playing"):
PlaySongs()
if data.has("SeenWAVDisclaimer"):
SeenWAVDisclaimer = data["SeenWAVDisclaimer"]
if data.has("TimeSpentListening"):
TimeSpentListening = data["TimeSpentListening"]
print("Listening time: " + str(TimeSpentListening))
if data.has("DiscordRichPresenceEnabled"):
settings_menu_child.discord_rich_presence_button.set_pressed_no_signal(data["DiscordRichPresenceEnabled"])
DiscordRichPresenceEnabled = data["DiscordRichPresenceEnabled"]
if data["DiscordRichPresenceEnabled"]:
setUpDiscord()
if data.has("DiscordUsername"):
if data["DiscordUsername"]:
if DiscordRichPresenceEnabled:
DiscordUsername = data["DiscordUsername"]
print("stiff ",data)
if data.has("ReverbEnabled") :
settings_menu_child.reverb_check.button_pressed = data["ReverbEnabled"]
if data.has("ReverbRoomSize") :
settings_menu_child.room_size_slider.value = data["ReverbRoomSize"]
if data.has("ReverbDampening") :
settings_menu_child.dampening_size_slider.value = data["ReverbDampening"]
if data.has("ReverbSpread") :
settings_menu_child.spread_size_slider.value = data["ReverbSpread"]
if data.has("CompressionEnabled") :
settings_menu_child.compression_check.button_pressed = data["CompressionEnabled"]
if data.has("CompressionThreshold") :
settings_menu_child.threshold_slider.value = data["CompressionThreshold"]
if data.has("CompressionRatio") :
settings_menu_child.ratio_slider.value = data["CompressionRatio"]
if data.has("CompressionGain") :
settings_menu_child.gain_slider.value = data["CompressionGain"]
if data.has("CurrentCustomBackroundImageDirectory"):
CurrentCustomBackroundImageDirectory = data["CurrentCustomBackroundImageDirectory"]
print("CurrentCustomBackroundImageDirectory " + CurrentCustomBackroundImageDirectory)
if data.has("PlayAllLists"):
PlayAllLists = data["PlayAllLists"]
if PlayAllLists:
play_all.button_pressed = true
if data.has("UsingPlayingNow"):
UsingPlayingNow = data["UsingPlayingNow"]
if UsingPlayingNow:
settings_menu_child.now_playing_window_button.button_pressed = true
if data.has("OverriddenLocale"):
TranslationServer.set_locale(data["OverriddenLocale"])
overridden_locale = data["OverriddenLocale"]
else:
if data != null:
print(data["Volume"])
SetVolume(data["Volume"])
var TrueDir
var TheSongName = Strin
var lenght = Strin.length()
var AmoutOfSwag:int = 0
for skibidi in lenght:
if Strin.ends_with("\\"):
AmoutOfSwag += 1
if AmoutOfSwag ==2:
TheSongName = TheSongName.erase(0,lenght)
print(TheSongName)
break
else:
lenght -= 1
Strin = Strin.erase(lenght)
OpenedSong = TheSongName
DirectorySelected(Strin)
PlaySongs()
#PlaySongs()
for child in get_children(true):
if child is Control:
child.focus_mode = child is LineEdit
if LoadingSaveFailed:
var file2 = FileAccess.open("user://playlists.dat", FileAccess.READ)
if !file2:
return
if (file2.get_error() != ERR_FILE_NOT_FOUND) or (file2.get_error() != ERR_FILE_BAD_PATH):
loading_failed_screen.Show()
ERR_PRINTER_ON_FIRE
func setUpDiscord():
DiscordRPC.app_id = 1276916292170809426
DiscordRPC.refresh()
print("stiff chicks ",DiscordRPC.get_current_user())
SplashStrings = ["the party just started!"]
var LText = SplashStrings.pick_random()
print(LText)
DiscordRPC.large_image_text = LText
DiscordRPC.large_image = "logo"
DiscordUsername = DiscordRPC.get_current_user().get("username")
DiscordRPC.refresh()
# this is boolean if everything worked
print("Discord working: " + str(DiscordRPC.get_is_discord_working()))
# Set the first custom text row of the activity here
if textSongs.size() >= CurrentIDX:
if textSongs.size() > CurrentIDX:
DiscordRPC.details = textSongs[CurrentIDX]
# Set the second custom text row of the activity here
DiscordRPC.state = ""
# Image key for small image from "Art Assets" from the Discord Developer website
# Tooltip text for the large image
# Image key for large image from "Art Assets" from the Discord Developer website
DiscordRPC.small_image = ""
# Tooltip text for the small image
DiscordRPC.small_image_text = "Nothing"
# "02:41 elapsed" timestamp for the activity
# Always refresh after changing the values!
DiscordRPC.refresh()
func deletesong(idx:int):
var currentDir:String= CurrentDir
currentDir += "/" + textSongs[idx]
delete_confirm.show()
delete_confirm.dialog_text = tr("DELETE_DIALOG") + textSongs[idx] +"?"
delete_confirm.confirmed.connect(deleteConfirmed)
delete_confirm.canceled.connect(deleteCancelled)
await ContinueDelete
delete_confirm.canceled.disconnect(deleteCancelled)
delete_confirm.confirmed.disconnect(deleteConfirmed)
if deleteSong:
print("deleted + " + currentDir)
deleteSong = false
var dir = DirAccess.remove_absolute(currentDir)
print("error code " +str(dir) + " (zero is good)")
if dir == 0:
textSongs.remove_at(idx)
if search_bar.visible:
search_bar.updateResults()
else:
songs_menu._pressed()
Playlists[CurrentPlaylist].erase(textSongs[idx])
func deleteCancelled():
deleteSong = false
ContinueDelete.emit()
func deleteConfirmed():
deleteSong = true
ContinueDelete.emit()
func SongDragStopped(Changed:bool):
if Changed:
music_player.play(current_progress.value * CurrentSongLenth / current_progress.max_value)
if Paused:
pausePlay()
UpdateProgressSlider = true
if DiscordRichPresenceEnabled:
DiscordRPC.start_timestamp = int(Time.get_unix_time_from_system() - (current_progress.value * CurrentSongLenth / current_progress.max_value))
DiscordRPC.refresh()
func SongDragStarted():
UpdateProgressSlider = false
func LoopSong():
if LoopingSong == true:
LoopingSong = false
loop.icon = LoopNotPressed
else:
LoopingSong = true
loop.icon = LoopPressed
func SetSong(IDX:int):
if LoopingSong:
LoopingSong = false
ReactivateLoop = true
loop.icon = LoopNotPressed
CurrentIDX = IDX -1
PlaySongs()
music_player.stop()
if !LoadingSaveFailed:
SaveEverything()
print("SetSong")
func pausePlay():
if music_player.stream_paused == true:
music_player.stream_paused = false
else:
music_player.stream_paused = true
func Skip():
if LoopingSong:
LoopingSong = false
ReactivateLoop = true
loop.icon = LoopNotPressed
music_player.stop()
func GoBack():
if LoopingSong:
LoopingSong = false
ReactivateLoop = true
loop.icon = LoopNotPressed
CurrentIDX -=2
music_player.stop()
func SetVolume(Volume:float):
var volume = (-50 + (Volume/2))
if Volume >= 2:
AudioServer.set_bus_volume_db(1,volume)
else:
AudioServer.set_bus_volume_db(1,-1000)
volume_slider.value = Volume
func SelectPlaylistDir():
file_dialog.show()
if !LoadingSaveFailed:
SaveEverything()
print("Select Playtlist dir")
func DirectorySelected(dir:String):
Randomized = false
print(dir)
CurrentDir = dir
GetSongs(dir)
func PlaySongs():
if music_player.playing:
Paused = true
music_player.stream_paused = true
play_list.icon = PLAY
DiscordRPC.state = tr("DELETE_DIALOG")
print(DiscordRPC.get_current_user())
else:
DiscordRPC.start_timestamp = int(Time.get_unix_time_from_system() - (current_progress.value * CurrentSongLenth / current_progress.max_value))
print(DiscordRPC.get_current_user())
DiscordRPC.state = tr("STATE_LISTENING")
Paused = false
music_player.stream_paused = false
play_list.icon = PAUSE
if music_player.get_playback_position() == 0.0:
if LoopingSong:
music_player.play()
elif textSongs.size() != 0:
var index:int
if OpenedSong.is_empty():
if PlayAllLists:
if CurrentIDX >= (textSongs.size()):
CurrentPlaylist = Playlists.keys()[(Playlists.keys().find(CurrentPlaylist)+1) % Playlists.keys().size()]
print(CurrentPlaylist)
index = CurrentIDX % textSongs.size()
else:
if PlayAllLists:
if CurrentIDX+1 >= (textSongs.size()-1):
CurrentPlaylist = Playlists.keys()[(Playlists.keys().find(CurrentPlaylist)+1) % Playlists.keys().size()]
index = textSongs.find(OpenedSong) % textSongs.size()
if PlayAllLists:
if !CurrentDir.ends_with(CurrentPlaylist):
GetSongs(PlaylistsLocation[CurrentPlaylist])
var CurrentSongDir:String = PlaylistsLocation[CurrentPlaylist] + "/" + textSongs[index]
if DiscordRichPresenceEnabled:
DiscordRPC.details = textSongs[index].replace(".mp3","")
currentSongName = textSongs[index].replace(".mp3","")
print(CurrentSongDir)
var sonnname:String = textSongs[index]
sonnname = sonnname.replace(".mp3", "")
song_name.text = sonnname
var dat = FileAccess.get_file_as_bytes(CurrentSongDir)
var song:AudioStreamMP3
if CurrentSongDir.to_lower().ends_with(".mp3"):
song = AudioStreamMP3.new()
cover.ChangeCover(song)
song.data = dat
if CurrentSongDir.to_lower().ends_with(".mp3"):
cover.ChangeCover(song)
print(MusicMetadataAutoload.get_mp3_metadata(song).print_info())
if MusicMetadataAutoload.get_mp3_metadata(song).title != "":
song_name.text = MusicMetadataAutoload.get_mp3_metadata(song).title
if MusicMetadataAutoload.get_mp3_metadata(song).artist != "":
currentArtistName = MusicMetadataAutoload.get_mp3_metadata(song).artist
else: currentArtistName = ""
artist_name.text = currentArtistName
if MusicMetadataAutoload.get_mp3_metadata(song).album != "":
currentAlbumName = MusicMetadataAutoload.get_mp3_metadata(song).album
else: currentAlbumName = ""
album_name.text = currentAlbumName
if song != null:
CurrentSongLenth = song.get_length()
music_player.stream = song
music_player.play()
if !LoadingSaveFailed:
SaveEverything()
print("set stream")
SongChanged.emit()
func GetSongs(dir:String):
print("Selected dir: " + dir)
var Access = DirAccess.open(dir)
if Access != null:
CurrentDir = dir
@warning_ignore("static_called_on_instance")
var Read:Array = Access.get_files_at(dir)
var songs:Array
var WavDisclaimer:bool
for song:String in Read:
if song.contains(".mp3"):
songs.append(song)
elif song.contains(".wav"):
WavDisclaimer = true
if WavDisclaimer:
if !SeenWAVDisclaimer:
wav_disclaimer.show()
SeenWAVDisclaimer = true
#print(songs)
search_results.clear()
textSongs = songs
for song in textSongs:
var nam = song
search_results.add_item(nam)
func Randomize():
if textSongs.size() != 0:
var Access = DirAccess.open(CurrentDir)
var Read:Array = Access.get_files_at(CurrentDir)
var Ssong:String
for read:String in Read:
if textSongs.size() > CurrentIDX:
if read.contains(textSongs[CurrentIDX]):
Ssong = read
print("Ssong = " + str(read))
textSongs.shuffle()
if Ssong != null:
CurrentIDX = textSongs.find(Ssong) # % textSongs.size()
print(CurrentIDX)
Randomized = true
search_results.clear()
for song in textSongs:
var nam = song
search_results.add_item(nam)
#print(textSongs)
func PlaylistSelected(Playlist:String,PlaylistLocation:String):
print(PlaylistLocation)
if Playlists.get(Playlist) == null:
printerr("PlaylistSelected(Playlist:String):: you FUCKED, no playlist found")
return
else:
CurrentPlaylist = Playlist
PlaylistsLocation[Playlist] = PlaylistLocation
print(PlaylistsLocation[Playlist])
CurrentDir = PlaylistLocation
GetSongs(PlaylistsLocation[Playlist])
CurrentIDX = -1
music_player.stop()
print("Playlist selected")
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
playing_now.visible = UsingPlayingNow
currentSaveTime -= _delta
if !BackroundSetup:
if CurrentCustomBackroundImageDirectory != null and CurrentCustomBackroundImageDirectory != "":
settings_menu_child._on_select_bg_dialog_file_selected(CurrentCustomBackroundImageDirectory)
BackroundSetup = true
if currentSaveTime < 0:
currentSaveTime = SaveInterval
if DiscordRichPresenceEnabled:
DiscordUsername = DiscordRPC.get_current_user().get("username")
if !LoadingSaveFailed:
SaveEverything()
@warning_ignore("integer_division")
if DiscordRichPresenceEnabled:
UpdateSplashes()
if DiscordRPC.get_is_discord_working():
print(DiscordRPC.get_current_user()["username"])
print(TimeSpentListening)
var LText = SplashStrings.pick_random()
DiscordRPC.large_image_text = LText
if DiscordRPC.get_is_discord_working():
DiscordRPC.refresh()
# "59:59 remaining" timestamp for the activity
if music_player.playing:
TimeSpentListening += _delta
CurrentPausedIndicatorShaderIntensity = lerp(CurrentPausedIndicatorShaderIntensity,0.0,0.1)
if DiscordRichPresenceEnabled:
DiscordRPC.state = tr("STATE_LISTENING")
else:
if DiscordRichPresenceEnabled:
DiscordRPC.start_timestamp = int(0)
DiscordRPC.state = tr("STATE_PAUSED")
if DiscordRPC.get_is_discord_working():
DiscordRPC.refresh()
CurrentPausedIndicatorShaderIntensity = lerp(CurrentPausedIndicatorShaderIntensity,1.0,0.1)
if DiscordRichPresenceEnabled:
DiscordRPC.run_callbacks()
var mat:ShaderMaterial = paused_indicator.material
mat.set_shader_parameter("intensity",CurrentPausedIndicatorShaderIntensity)
var CurrentLenght:float = music_player.get_playback_position() / CurrentSongLenth * current_progress.max_value
if UpdateProgressSlider == true:
current_progress.value = CurrentLenght
#print(CurrentLenght)
@warning_ignore("integer_division")
var mins = int(music_player.get_playback_position()) / 60
@warning_ignore("integer_division")
var Hours:String = str(mins/60)
if music_player.stream != null:
var Minutes:String = (str("0" + str(mins%60)) if !int(music_player.stream.get_length() / 60) < 10 else str(mins%60)) if (mins%60) < 10 else str(mins%60)
var Seconds:String = "0" + str(int(music_player.get_playback_position()) % 60) if int(music_player.get_playback_position()) % 60 < 10 else str(int(music_player.get_playback_position()) % 60)
time_listening_song.text = Hours + ":" + Minutes + ":" + Seconds if int(music_player.stream.get_length() /60 / 60) != 0 else Minutes + ":" + Seconds
else:
time_listening_song.text = "0:00"
#time_listening_song.text = str(music_player.get_playback_position())
if Input.is_action_pressed("ui_down"):
volume_slider.value -= 1*_delta *50
if Input.is_action_pressed("ui_up"):
volume_slider.value += 1*_delta *50
if CurrentLenght == 0:
if LoopingSong == false:
CurrentIDX +=1
PlaySongs()
if ReactivateLoop:
LoopingSong = true
ReactivateLoop = false
loop.icon = LoopPressed
if DiscordRichPresenceEnabled:
DiscordRPC.refresh()
func UpdateSplashes():
if DiscordRPC.get_is_discord_working() && DiscordRichPresenceEnabled:
SplashStrings = ["Total listening time: %s!" % str(str(int(TimeSpentListening/60)/60 )
+ "h : " + str((int(TimeSpentListening) / 60) % 60) + "m : " +
str(int(TimeSpentListening) % 60) + "s"),
"Version: %s" % version.text,"🤷‍♂️","This Changes every ~11 seconds",
"hello everybody my name is %s" % DiscordRPC.get_current_user()["username"],
"wash your dishes, i know you got some","Running on %s" % OS.get_distribution_name(),
"%s is cooking" % DiscordRPC.get_current_user()["username"], "debugging" if OS.has_feature("editor") else "Release build",
"this user chose to show you all this info","Playing a Banger",
":steamhappy:","This is a sign that crocodiles live in water",
"Space? SPACE?! SPAAAAAAAAAAAAACE!!!",
"i love gd colonge",
"listening with reverb" if settings_menu_child.reverb_check.button_pressed else
"not listening with reverb","the cake is edible",
"what a great song!","this message is useless",
"stop reading these","why are you reading these",
"hello from mars", "hello to mars","there is a fly in my room",
"yippee!","What, are they allergic to bathtubs or something",
"Did you know, a 737 can land with up to 33knots of wind!",
"Welcome to todays JahresSchau",
"ram is very useful","your cpu is tasty","main course: Nvidia GPU",
"SCHOTTLAND FUER IMMER","i eat airborne vehicles","linus trovalds",
"","\(〇_o)/","Nuh Uh!","Yuh Huh","Breaching.",
"I get a narcissistic injury when the wall ignores me","totally not using %s" % version.text]
func SaveEverything():
var Data:Dictionary = {
"Version" : version.text,
"Volume" : volume_slider.value,
"Directory" : CurrentDir,
"CurrIDX" : CurrentIDX,
"Randomized" : Randomized,
"Playing" : music_player.playing,
"SeenWAVDisclaimer" : SeenWAVDisclaimer,
"TimeSpentListening" : TimeSpentListening,
"DiscordRichPresenceEnabled" : DiscordRichPresenceEnabled,
"ReverbEnabled" : settings_menu_child.reverb_check.button_pressed,
"ReverbRoomSize" : settings_menu_child.room_size_slider.value,
"ReverbDampening" : settings_menu_child.dampening_size_slider.value,
"ReverbSpread" : settings_menu_child.spread_size_slider.value,
"CompressionEnabled" : settings_menu_child.compression_check.button_pressed,
"CompressionThreshold" : settings_menu_child.threshold_slider.value ,
"CompressionRatio" : settings_menu_child.ratio_slider.value ,
"CompressionGain" : settings_menu_child.gain_slider.value,
"CurrentCustomBackroundImageDirectory" : CurrentCustomBackroundImageDirectory,
"PlayAllLists" : PlayAllLists,
"DiscordUsername" : DiscordRPC.get_current_user().get("username"),
"UsingPlayingNow" : UsingPlayingNow,
"OverriddenLocale" : overridden_locale
}
print("saving")
saveUserdata(Data)
savePlaylists()
var saveRetrys:int =0
func savePlaylists():
var json = JSON.new()
var file = FileAccess.open("user://playlists.dat", FileAccess.WRITE)
var file2 = FileAccess.open("user://playlistsLocation.dat", FileAccess.WRITE)
@warning_ignore("static_called_on_instance")
if !(Playlists == null) or !(Playlists == {}):
file.store_string(str(json.stringify(Playlists)))
if !(PlaylistsLocation == null) or !(PlaylistsLocation == {}):
file2.store_string(str(json.stringify(PlaylistsLocation)))
if loadUserdata() == {}:
if saveRetrys < 3:
savePlaylists()
else:
printerr("saving failed")
func saveUserdata(content):
var json = JSON.new()
var file = FileAccess.open("user://data.dat", FileAccess.WRITE)
@warning_ignore("static_called_on_instance")
file.store_string(json.stringify(content))
file.close()
var saveLoadTries:int
func loadUserdata() -> Dictionary:
var json = JSON.new()
var file = FileAccess.open("user://data.dat", FileAccess.READ)
var filetext = file.get_as_text() if file != null else null
if file != null:
if file.get_as_text() == "":
return loadingFailed(true)
var content:Dictionary = {}
if json.parse_string(file.get_as_text()) != null:
content = json.parse_string(filetext)
else:
@warning_ignore("static_called_on_instance")
content = json.parse_string(Marshalls.base64_to_utf8(file.get_as_text()))
file.close()
if content != null:
LoadingSaveFailed = false
return content
else:
LoadingSaveFailed = true
return {}
else:
return loadingFailed(false)
func loadingFailed(fullfail:bool = false) -> Dictionary:
if fullfail:
printerr("loading save failed")
if saveLoadTries < 3:
print("retrying")
saveLoadTries +=1
return loadUserdata()
LoadingSaveFailed = fullfail
return {}
var playlistLoadTries:int
func loadPlaylists():
var json = JSON.new()
var file = FileAccess.open("user://playlistsLocation.dat", FileAccess.READ)
var file2 = FileAccess.open("user://playlists.dat", FileAccess.READ)
if !(file and file2):
return
var filetext = file.get_as_text()
print("Playlists")
print(filetext)
#print("shit " + json.parse_string(filetext))
if file.get_as_text() != "" and file2.get_as_text() != "":
var PlaylistsLocationTemp
var PlaylistsTemp
PlaylistsLocationTemp = json.parse_string(file.get_as_text())
PlaylistsTemp = json.parse_string(file2.get_as_text())
if (PlaylistsTemp == null) or (PlaylistsLocationTemp == null):
printerr("Loading playlists failed")
LoadingSaveFailed = true
else:
LoadingSaveFailed = false
Playlists = PlaylistsTemp
PlaylistsLocation = PlaylistsLocationTemp
print(PlaylistsLocation)
print(Playlists.keys())
print("Playlists")
file.close()
file2.close()
-1
View File
@@ -1 +0,0 @@
uid://cvqefw0g6ala7
-4
View File
@@ -1,4 +0,0 @@
extends Button
func _pressed() -> void:
OS.shell_open("https://notdraimdev.github.io/SimplSite/notes.html")
-1
View File
@@ -1 +0,0 @@
uid://bh3btjt2hkbs
-43
View File
@@ -1,43 +0,0 @@
extends Control
@export var ParentScene:MainScene
@export var SongImage:TextureRect
@export var SongNameLabel: RichTextLabel
@export var SongNameScroller:ScrollContainer
@export var SongAuthorScroller:ScrollContainer
@export var SongAuthorLabel: RichTextLabel
@onready var ParentWindow:Window = $".."
@export var update_tick:float = 0.1
@export var slider:HSlider
var ticktime:float
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
ParentScene.SongChanged.connect(SongChanged)
func scroll(scroller:ScrollContainer,incriment:float):
var scroll_h = scroller.get_h_scroll_bar().max_value - scroller.custom_minimum_size.x
if scroll_h !=0:
scroller.scroll_horizontal = wrapi(scroller.scroll_horizontal+incriment,0,\
scroll_h)
return scroller.scroll_horizontal == scroll_h-1 or scroller.scroll_horizontal == 0
return false
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
ticktime -= delta
ParentWindow.size = size
slider.value = ParentScene.current_progress.value
if ticktime <= 0:
ticktime = update_tick
if scroll(SongNameScroller,1):
ticktime = 2
scroll(SongAuthorScroller,1)
func SongChanged():
SongImage.texture = ParentScene.cover.texture
print("SongChanged: ", ParentScene.currentSongName)
SongNameLabel.text = ParentScene.currentSongName
if ParentScene.currentArtistName:
SongAuthorLabel.text = ParentScene.currentArtistName
else:
SongAuthorLabel.text = ""
#ParentWindow.size = size * 2
-1
View File
@@ -1 +0,0 @@
uid://q2gdlr10ncnb
-18
View File
@@ -1,18 +0,0 @@
shader_type canvas_item;
uniform sampler2D alpha;
void vertex() {
// Called for every vertex the material is visible on.
}
void fragment() {
COLOR.a = texture(alpha,UV).a;
//COLOR.a = 1.0-((cos((UV.x)*PI*2.0)+1.0)/2.0);
//COLOR.a -= ((cos(UV.y*PI*2.0)+1.0)/2.0);
}
//void light() {
// // Called for every pixel for every light affecting the CanvasItem.
// // Uncomment to replace the default light processing function with this one.
//}
-1
View File
@@ -1 +0,0 @@
uid://byan4wmg2pjl6
-76
View File
@@ -1,76 +0,0 @@
extends Control
@onready var nameLabel: RichTextLabel = $HSplitContainer/VBoxContainer/Name
@onready var directory: Label = $HSplitContainer/VBoxContainer/Directory
@onready var play_button: Button = $HSplitContainer/HBoxContainer/PlayButton
@onready var file_dialog: FileDialog = $FileDialog
@onready var options_dropdown: MenuButton = $HSplitContainer/HBoxContainer/OptionsDropdown
@onready var confirmation: ConfirmationDialog = $ConfirmationDialog
@onready var Parent:MainScene = get_tree().root.get_child(3)
@export var Current:bool
var PlaylistLocation:String = ""
var PlaylistName:String = ""
var PlaylistSongs:Array = []
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
CorrectlyName()
options_dropdown.get_popup().id_pressed.connect(dropdown_pressed)
func dropdown_pressed(Idx:int):
match options_dropdown.get_popup().get_item_text(Idx):
"Change Directory":
_on_select_directory_pressed()
"Delete":
confirmation.show()
"Rename":
pass
Parent.SaveEverything()
func Delete():
Parent.PlaylistsLocation.erase(nameLabel.text)
Parent.Playlists.erase(nameLabel.text)
queue_free()
Parent.SaveEverything()
func CorrectlyName():
nameLabel.text = PlaylistName
if !PlaylistLocation == "":
directory.text = PlaylistLocation
else:
directory.text = "Directory not found"
push_error("Directory not found!")
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
if Parent == null:
push_error("MisMatched REF PLAYLIST DISPLAY")
Parent = owner
if Current:
play_button.disabled = true
play_button.text = "Playing"
else:
play_button.disabled = false
play_button.text = "Play"
if Parent.CurrentPlaylist == PlaylistName:
play_button.disabled = true
func _on_play_button_pressed() -> void:
Parent.PlaylistSelected(PlaylistName,PlaylistLocation)
func _on_select_directory_pressed() -> void:
file_dialog.show()
func _on_file_dialog_dir_selected(dir: String) -> void:
PlaylistLocation = dir
Parent.PlaylistsLocation[PlaylistName] = PlaylistLocation
CorrectlyName()
func _on_confirmation_dialog_confirmed() -> void:
Delete()
-1
View File
@@ -1 +0,0 @@
uid://cs12qambyvou8
-25
View File
@@ -1,25 +0,0 @@
extends Control
@onready var create_playlist: Button = $PlaylistsContainer/VBoxContainer/HBoxContainer/CreatePlaylist
@onready var create_playlists_menu: Control = $"../../CreatePlaylistsMenu"
@onready var play_all: Button = $PlaylistsContainer/VBoxContainer/HBoxContainer/PlayAll
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_create_playlist_pressed() -> void:
create_playlists_menu.show()
func _on_play_all_toggled(toggled_on: bool) -> void:
if toggled_on:
owner.PlayAllLists = true
else:
owner.PlayAllLists = false
-1
View File
@@ -1 +0,0 @@
uid://bxc2fqwlm5ea5
-59
View File
@@ -1,59 +0,0 @@
extends LineEdit
@onready var search_results: SearchResults = $"../SearchResults"
var values:Dictionary = {}
var ErrorMargin:float = 0.9
var updatetime:float = 0.5
var currentTime:float
var TextChanged:bool
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
currentTime -= delta
if TextChanged:
if currentTime < 0:
updateResults()
func updateResults():
release_focus()
TextChanged = false
search_results.clear()
values.clear()
currentTime = updatetime
var _i:int = 0
var _s:int = 0
for song:String in owner.textSongs:
var margin:float
var fragments:Array
#print(int((text.length() / 2.0) + 0.5))
for num in range(int((text.length() / 2.0) + 0.5)):
if text.to_lower().substr(int(num*2),2):
fragments.append(text.to_lower().substr(int(num*2),2))
elif text.to_lower().substr(int(num*2),1):
fragments.append(text.to_lower().substr(int(num*2),1))
var amountOfFrags:int
for fragment:String in fragments:
if song.to_lower().containsn(fragment):
amountOfFrags +=1
margin = float(amountOfFrags) / fragments.size()
if margin > ErrorMargin:
search_results.add_item(song)
values[_i] = _s
_i += 1
_s += 1
func _on_search_results_index_pressed(index: int) -> void:
print("index " + str(index))
owner.SetSong(values[index])
func _on_text_submitted(new_text: String) -> void:
TextChanged = true
if !search_results.visible:
search_results.show()
-1
View File
@@ -1 +0,0 @@
uid://cchutywgopaq4
-43
View File
@@ -1,43 +0,0 @@
extends Control
var SongName:String
var CurrentlyPlaying:bool
var songidx:int
@onready var songname: Button = $HBoxContainer/Songname
@onready var dropdown: Button = $HBoxContainer/Dropdown
@onready var popup_menu: PopupMenu = $PopupMenu
signal PlayPressed
signal DeletePressed
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
songname.text = SongName
popup_menu.index_pressed.connect(popupPressed)
func popupPressed(idx:int):
match idx:
0:
DeletePressed.emit(songidx)
1:
var songdir = MainScene.instance.CurrentDir + "/" + MainScene.instance.textSongs[songidx]
var song = AudioStreamMP3.load_from_file(songdir)
var meta:MusicMeta.MusicMetadata = MusicMeta.new().get_mp3_metadata(song)
print(songdir)
meta.print_info()
if meta.comments:
OS.shell_open(meta.comments)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
dropdown.visible = songname.is_hovered() or dropdown.is_hovered()
func _on_songname_pressed() -> void:
PlayPressed.emit(songidx)
func _on_dropdown_pressed() -> void:
popup_menu.show()
popup_menu.position = get_global_mouse_position()
-1
View File
@@ -1 +0,0 @@
uid://c3aaxhp0oim08
-48
View File
@@ -1,48 +0,0 @@
class_name SearchResults
extends Control
signal index_pressed
signal song_deleted
const SEARCH_ITEM = preload("res://Scenes/search_item.tscn")
@onready var item_container: VBoxContainer = $Control/ItemContainer
var SongsAmount:int
@onready var parent:MainScene = owner
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func add_item(text:String):
var child = SEARCH_ITEM.instantiate()
child.SongName = text.replace(".mp3", "")
child.songidx = parent.textSongs.find(text)
SongsAmount+=1
child.PlayPressed.connect(songSelected)
child.DeletePressed.connect(deletePressed)
item_container.add_child(child)
func clear():
SongsAmount = 0
for child in item_container.get_children():
child.queue_free()
func songSelected(idx:int):
index_pressed.emit(idx)
func _input(event):
if (event is InputEventMouseButton) and event.pressed:
var evLocal = make_input_local(event)
if !Rect2(Vector2(0,0),Vector2(size.x,size.y)).has_point(evLocal.position):
hide()
func deletePressed(idx:int):
song_deleted.emit(idx)
-1
View File
@@ -1 +0,0 @@
uid://d0hvudugo3d37
-28
View File
@@ -1,28 +0,0 @@
extends Button
@onready var search_bar: LineEdit = $"../SearchBar"
@onready var songs_menu: Button = $"../SongsMenu"
@export var PressedIcon:Texture2D
@export var NotPressedIcon:Texture2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
search_bar.hide()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_toggled(toggled_on: bool) -> void:
if toggled_on:
search_bar.clear()
search_bar.show()
songs_menu.hide()
icon = PressedIcon
else:
search_bar.hide()
songs_menu.show()
icon = NotPressedIcon
-1
View File
@@ -1 +0,0 @@
uid://c2t3ignwqoplj
-23
View File
@@ -1,23 +0,0 @@
extends Button
@onready var playlists_panel: Control = $"../PlaylistPanelHolder/PlaylistsPanel"
var currentlyExtending:bool
var Target:float = 50
func _process(delta: float) -> void:
if currentlyExtending:
playlists_panel.position.x = clamp(lerp(playlists_panel.position.x,Target,0.25),0,100)
else:
playlists_panel.position.x -=1
playlists_panel.position.x = clamp(lerp(Target,playlists_panel.position.x,1.25),0,100)
playlists_panel.modulate.a = playlists_panel.position.x / Target
if playlists_panel.position.x > 1:
playlists_panel.show()
else:
playlists_panel.hide()
func _on_toggled(toggled_on: bool) -> void:
if toggled_on:
currentlyExtending = true
playlists_panel.position.x = 1
else:
currentlyExtending = false
-1
View File
@@ -1 +0,0 @@
uid://dv2vjibopktug
-195
View File
@@ -1,195 +0,0 @@
class_name Settings
extends Control
@onready var exit: Button = $Exit
# do NOT think i dont hate this codebase, it sucks man 😭
@onready var discord_rich_presence_button: CheckBox = $ScrollContainer/VBoxContainer/DiscordRichPresenceButton
@onready var pitch_slider: HSlider = $ScrollContainer/VBoxContainer/PitchAdjustSettings/PitchSlider
@onready var pitch_value: Label = $ScrollContainer/VBoxContainer/PitchAdjustSettings/PitchAdjustSettings/PitchValue
@onready var reverb_check: CheckBox = $ScrollContainer/VBoxContainer/ReverbCheck
@onready var room_size_slider: HSlider = $ScrollContainer/VBoxContainer/ReverbSettings/SizeAdjustSettings/RoomSizeSlider
@onready var room_size_value: Label = $ScrollContainer/VBoxContainer/ReverbSettings/SizeAdjustSettings/PitchAdjustSettings/RoomSizeValue
@onready var dampening_size_slider: HSlider = $ScrollContainer/VBoxContainer/ReverbSettings/DampeningAdjustSettings/DampeningSizeSlider
@onready var dampening_value: Label = $ScrollContainer/VBoxContainer/ReverbSettings/DampeningAdjustSettings/DampaningAdjustSettings/DampeningValue
@onready var spread_size_slider: HSlider = $ScrollContainer/VBoxContainer/ReverbSettings/SpreadAdjustSettings2/SpreadSizeSlider
@onready var spread_value: Label = $ScrollContainer/VBoxContainer/ReverbSettings/SpreadAdjustSettings2/SpreadAdjustSettings/SpreadValue
@onready var compression_check: CheckBox = $ScrollContainer/VBoxContainer/CompressionCheck
@onready var threshold_slider: HSlider = $ScrollContainer/VBoxContainer/CompressionContainer/ThresholdSettings/ThresholdSlider
@onready var threshold_value: Label = $ScrollContainer/VBoxContainer/CompressionContainer/ThresholdSettings/ThresholdSettings/ThresholdValue
@onready var ratio_slider: HSlider = $ScrollContainer/VBoxContainer/CompressionContainer/RatioSettings/RatioSlider
@onready var ratio_value: Label = $ScrollContainer/VBoxContainer/CompressionContainer/RatioSettings/RatioSettings/RatioValue
@onready var gain_slider: HSlider = $ScrollContainer/VBoxContainer/CompressionContainer/GainSettings/GainSlider
@onready var gain_value: Label = $ScrollContainer/VBoxContainer/CompressionContainer/GainSettings/GainSettings/GainValue
@onready var eq_settings: VBoxContainer = $ScrollContainer/VBoxContainer/EQSettings
@onready var Parent:MainScene = get_parent().owner
@onready var reverb_settings: VBoxContainer = $ScrollContainer/VBoxContainer/ReverbSettings
@onready var compression_container: VBoxContainer = $ScrollContainer/VBoxContainer/CompressionContainer
@onready var time_listening_label: Label = $ScrollContainer/VBoxContainer/TimeListening
@onready var scroll_container: ScrollContainer = $ScrollContainer
@onready var select_bg_dialog: FileDialog = $ScrollContainer/VBoxContainer/SelectBGDialog
@onready var backround_dir_label: Label = $ScrollContainer/VBoxContainer/VBoxContainer/HBoxContainer2/BackroundDirLabel
@onready var select_bg: Button = $ScrollContainer/VBoxContainer/VBoxContainer/HBoxContainer/SelectBG
@onready var reset_bg: Button = $ScrollContainer/VBoxContainer/VBoxContainer/HBoxContainer/ResetBG
@onready var now_playing_window_button: CheckBox = $ScrollContainer/VBoxContainer/NowPlayingWindowButton
var CurrentBGImagePath:String
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
now_playing_window_button.button_pressed = Parent.UsingPlayingNow
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pitch_value.text = str(pitch_slider.value)
room_size_value.text = str(room_size_slider.value)
dampening_value.text = str(dampening_size_slider.value)
spread_value.text = str(spread_size_slider.value)
ratio_value.text ="1:" + str(ratio_slider.value)
gain_value.text = str(gain_slider.value)
threshold_value.text = str(threshold_slider.value)
if reverb_check.button_pressed:
reverb_settings.show()
else:
reverb_settings.hide()
if compression_check.button_pressed:
compression_container.show()
else:
compression_container.hide()
time_listening_label.text = tr("LISTENING_TIME") + " %s!" % str(str(int(Parent.TimeSpentListening/60)/60 )
+ "h : " + str((int(Parent.TimeSpentListening) / 60) % 60) + "m : " +
str(int(Parent.TimeSpentListening) % 60) + "s")
# VOLUME
func _on_h_slider_drag_ended(value_changed: bool) -> void:
get_parent().owner.music_player.pitch_scale = pitch_slider.value
Parent.SaveEverything()
func _on_exit_pressed() -> void:
Parent.find_child("SettingsButton").button_pressed = false
Parent.SaveEverything()
#region Reverb
func _on_reverb_check_toggled(toggled_on: bool) -> void:
if toggled_on:
AudioServer.set_bus_effect_enabled(AudioServer.get_bus_index("Music"),0,true)
else:
AudioServer.set_bus_effect_enabled(AudioServer.get_bus_index("Music"),0,false)
Parent.SaveEverything()
func _on_room_size_slider_drag_ended(value_changed: bool) -> void:
var Reverb:AudioEffectReverb = AudioServer.get_bus_effect(AudioServer.get_bus_index("Music"),0)
Reverb.room_size = room_size_slider.value
Parent.SaveEverything()
func _on_dampening_size_slider_drag_ended(value_changed: bool) -> void:
var Reverb:AudioEffectReverb = AudioServer.get_bus_effect(AudioServer.get_bus_index("Music"),0)
Reverb.damping = room_size_slider.value
Parent.SaveEverything()
func _on_spread_size_slider_drag_ended(value_changed: bool) -> void:
var Reverb:AudioEffectReverb = AudioServer.get_bus_effect(AudioServer.get_bus_index("Music"),0)
Reverb.spread = room_size_slider.value
Parent.SaveEverything()
#endregion
#region Compression
func _on_compression_check_toggled(toggled_on: bool) -> void:
if toggled_on:
AudioServer.set_bus_effect_enabled(AudioServer.get_bus_index("Music"),2,true)
else:
AudioServer.set_bus_effect_enabled(AudioServer.get_bus_index("Music"),2,false)
Parent.SaveEverything()
func _on_gain_slider_drag_ended(value_changed: bool) -> void:
var Compression:AudioEffectCompressor = AudioServer.get_bus_effect(AudioServer.get_bus_index("Music"),2)
Compression.gain = gain_slider.value
Parent.SaveEverything()
func _on_ratio_slider_drag_ended(value_changed: bool) -> void:
var Compression:AudioEffectCompressor = AudioServer.get_bus_effect(AudioServer.get_bus_index("Music"),2)
Compression.ratio = ratio_slider.value
Parent.SaveEverything()
func _on_threshold_slider_drag_ended(value_changed: bool) -> void:
var Compression:AudioEffectCompressor = AudioServer.get_bus_effect(AudioServer.get_bus_index("Music"),2)
Compression.threshold = threshold_slider.value
Parent.SaveEverything()
#endregion
func _on_eq_check_box_toggled(toggled_on: bool) -> void:
eq_settings.visible = toggled_on
AudioServer.set_bus_effect_enabled(AudioServer.get_bus_index("Music"),1,toggled_on)
func _on_discord_rich_presence_button_toggled(toggled_on: bool) -> void:
if toggled_on:
Parent.DiscordRichPresenceEnabled = true
else:
Parent.DiscordRichPresenceEnabled = false
Parent.setUpDiscord()
Parent.SaveEverything()
func _on_reset_pressed() -> void:
gain_slider.value = 0
reverb_check.button_pressed = false
room_size_slider.value = 0.8
dampening_size_slider.value = 0.8
spread_size_slider.value = 0.8
compression_check.button_pressed = false
threshold_slider.value = -9.15
ratio_slider.value = 4
gain_slider.value = 0
pitch_slider.value = 1
get_parent().owner.music_player.pitch_scale = 1
func _on_select_bg_pressed() -> void:
select_bg_dialog.show()
Parent.SaveEverything()
func _on_select_bg_dialog_file_selected(path: String) -> void:
CurrentBGImagePath = path
Parent.CurrentCustomBackroundImageDirectory = path
backround_dir_label.text = path
#print(path)
if !path.ends_with(".gif"):
Parent.user_bg.texture = ImageTexture.create_from_image(Image.load_from_file(CurrentBGImagePath))
else:
Parent.user_bg.texture = GifManager.animated_texture_from_file(path)
Parent.SaveEverything()
func _on_reset_bg_pressed() -> void:
backround_dir_label.text = ""
Parent.user_bg.texture = null
Parent.CurrentCustomBackroundImageDirectory = ""
Parent.SaveEverything()
func _on_now_playing_window_button_toggled(toggled_on: bool) -> void:
Parent.UsingPlayingNow = toggled_on
Parent.SaveEverything()
-1
View File
@@ -1 +0,0 @@
uid://vnpslgl788du
-25
View File
@@ -1,25 +0,0 @@
extends Button
@onready var settings_popup: Control = $"../SettingsHolder/SettingsPopup"
var currentlyExtending:bool
var Target:float = 50
func _process(delta: float) -> void:
if currentlyExtending:
settings_popup.position.y = clamp(lerp(settings_popup.position.y,Target,0.25),0,100)
else:
settings_popup.position.y -=1
settings_popup.position.y = clamp(lerp(Target,settings_popup.position.y,1.25),0,100)
settings_popup.modulate.a = settings_popup.position.y / Target
if settings_popup.position.y > 1:
settings_popup.show()
else:
settings_popup.hide()
func _on_toggled(toggled_on: bool) -> void:
print("@@")
if toggled_on:
currentlyExtending = true
settings_popup.position.y = 1
else:
currentlyExtending = false
-1
View File
@@ -1 +0,0 @@
uid://xnlvpxy2jwxb
-20
View File
@@ -1,20 +0,0 @@
extends Button
@onready var search_results: SearchResults = $"../SearchResults"
@onready var parent:MainScene = owner
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _pressed() -> void:
if search_results.SongsAmount != parent.textSongs.size():
search_results.clear()
for song in parent.textSongs:
var nam = song
search_results.add_item(nam)
search_results.show()
-1
View File
@@ -1 +0,0 @@
uid://dkjp64f01dpf4
-134
View File
@@ -1,134 +0,0 @@
extends Control
@onready var Parent:MainScene = get_tree().root.get_child(3)
@onready var version: Label = $"../Version"
@onready var http_request := $HTTPRequest as HTTPRequest
@onready var download_request: HTTPRequest = $DownloadRequest
@onready var link_button: Button = $ColorRect/LinkButton
@onready var update_available_text: Label = $ColorRect/UpdateAvailableText
@onready var updating_notification: Control = $"../UpdatingNotification"
@onready var errorLabel: Label = $"../UpdatingNotification/Error"
@onready var updating_bg: ColorRect = $"../UpdatingBG"
@onready var paused_indicator: TextureRect = $"../PausedIndicator"
@onready var patchnotes: RichTextLabel = $ColorRect/Patchnotes
@onready var link_bttnbg: ColorRect = $ColorRect/LinkButton/LinkBTTNBG
@onready var patchnotes_bg: ColorRect = $ColorRect/Patchnotes/PatchnotesBG
@export var errorColor:Color
@export var IMPUpdateLinkColor:Color
@export var IMPUpdatePatchNotesColor:Color
var CheckForUpdates:bool = true
var updateLink:String
# The GitHub releases API only allows 60 unauthenticated requests per hour,
const UPDATE_THROTTLE = 600
func _ready() -> void:
hide()
if CheckForUpdates:
check_for_updates()
func check_for_updates() -> void:
print("! INFO: Checking for updates…")
var error := http_request.request(
"https://api.github.com/repos/realbucketofchicken/Simplaudio/releases/latest"
)
if error != OK:
push_error("! a client error occurred")
errorLabel.text = tr("UPD_ERR_CLT")
func _on_http_request_completed(result: int, _response_code: int, _headers: PackedStringArray, body: PackedByteArray) -> void:
if result != HTTPRequest.RESULT_SUCCESS:
# The request failed for any reason, abort
push_error("! Couldn't check for updates")
return
else:
print("! Update check successful")
var json = JSON.new()
var result2 = json.parse_string(str(body.get_string_from_utf8()))
print("! AHHH " + str(result2))
if result2.has("tag_name"):
if result2["tag_name"] != version.text:
update_available_text.text = result2["tag_name"] + tr("UPDT_OUT_END")
show()
updateLink = result2["html_url"]
if result2.has("body"):
patchnotes.text = str(result2["body"])
if patchnotes.text.contains("(!IT)"):
patchnotes.text = patchnotes.text.erase(patchnotes.text.find("(!IT)"),7)
print("import-aint update detected")
update_available_text.text = tr("IMPORTANT") + " " + result2["tag_name"] + tr("UPDT_OUT_END")
patchnotes_bg.color = IMPUpdatePatchNotesColor
link_bttnbg.color = IMPUpdateLinkColor
link_bttnbg.StandardColor = IMPUpdateLinkColor
func _on_close_buen_pressed() -> void:
hide()
func _on_link_button_pressed() -> void:
link_button.disabled = true
link_button.text = tr("UPD_UPDATING")
updating_notification.show()
updating_bg.show()
paused_indicator.hide()
var exepath:PackedStringArray = OS.get_executable_path().split("/")
var path:String = GetLocalPath()
print(OS.get_executable_path())
if !OS.has_feature("editor"):
download_request.download_file = path + "download.zip"
var DownloadLink:String
if OS.get_name() == "Windows":
DownloadLink = "https://github.com/notdraimdev/Simplaudio/releases/latest/download/Windows.zip"
elif OS.get_name() == "Linux":
DownloadLink = "https://github.com/notdraimdev/Simplaudio/releases/latest/download/Linux.zip"
if DownloadLink.is_empty() != true:
var error = download_request.request(DownloadLink
)
if error != OK:
print("! DOWNLOAD ERROR: " + str(error))
errorLabel.text = tr("UPD_ERR_CODE") + str(error)
errorLabel.label_settings.font_color = errorColor
else:
errorLabel.text = "downloading..."
else:
push_error("OS NOT SUPPORTED, you should not get this error but you did, congrat!")
OS.shell_open(updateLink)
func _on_download_request_completed(result: int, response_code: int, headers: PackedStringArray, body: PackedByteArray) -> void:
if result != HTTPRequest.RESULT_SUCCESS:
print("! Something went wrong server side: " + str(result))
errorLabel.text = tr("UPD_ERR_CODE") + str(result)
errorLabel.label_settings.font_color = errorColor
return
else:
errorLabel.text = tr("UPD_UNZIP_PANT")
print("works as expected brotha")
var unzipper:ZIPReader = ZIPReader.new() # sus
unzipper.open(GetLocalPath()+"download.zip")
var files:PackedStringArray = unzipper.get_files()
for file in files:
var actualfile = file.replace("Linux/","").replace("Windows/","").replace("Android/","")
print("FILE: " + actualfile)
var FileAcess:FileAccess = FileAccess.open(GetLocalPath() + actualfile,FileAccess.WRITE_READ)
if FileAcess != null:
var downloadedfile = unzipper.read_file(file)
FileAcess.store_buffer(downloadedfile)
print("FOUND FILE: " + GetLocalPath()+file)
#FileAcess.store_string()
unzipper.close()
OS.shell_open(OS.get_executable_path())
get_tree().root.close_requested.emit()
get_tree().root.queue_free()
func GetLocalPath() -> String:
var exepath:PackedStringArray = OS.get_executable_path().split("/")
var path:String
for sting in (exepath.size()-1):
path += exepath[sting] + "/"
return path
-1
View File
@@ -1 +0,0 @@
uid://drqx8pjalsxqr
-33
View File
@@ -1,33 +0,0 @@
extends Button
@onready var volume_slider: VSlider = $"../VolumeSlider"
var BaseOffsetPX:int = 4
var Target:float = 200
var currentlyExtending:bool
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
volume_slider.hide()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
if currentlyExtending:
volume_slider.size.y = lerp(volume_slider.size.y,Target,0.25)
else:
volume_slider.size.y -=3
volume_slider.size.y = lerp(Target,volume_slider.size.y,1.25)
volume_slider.position.y = (BaseOffsetPX- 90) - volume_slider.size.y + (owner.size.y)
volume_slider.self_modulate.a = volume_slider.size.y / 200
if volume_slider.size.y > 15:
volume_slider.show()
else:
volume_slider.hide()
func _on_toggled(toggled_on: bool) -> void:
if toggled_on:
volume_slider.show()
currentlyExtending = true
else:
currentlyExtending = false
volume_slider.size.y = 192
-1
View File
@@ -1 +0,0 @@
uid://ctj7miuviibin
-36
View File
@@ -1,36 +0,0 @@
extends Node2D
@export var Daytime:Control#1
@export var Evening:Control#2
@export var Nighttime:Control#3
var currentBG:int
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
var timeInHours = Time.get_datetime_dict_from_system()["hour"]
if timeInHours < 6:
currentBG = 3
elif timeInHours >= 6 and timeInHours <= 9:
currentBG = 2
elif timeInHours >= 9 and timeInHours <= 17:
currentBG = 1
elif timeInHours >= 17 and timeInHours <= 21:
currentBG = 2
elif timeInHours > 21:
currentBG = 3
if currentBG == 1:
Daytime.show()
Nighttime.hide()
Evening.hide()
elif currentBG == 2:
Daytime.hide()
Nighttime.hide()
Evening.show()
elif currentBG == 3:
Daytime.hide()
Nighttime.show()
Evening.hide()
-1
View File
@@ -1 +0,0 @@
uid://b4mmbu4weiab5
-11
View File
@@ -1,11 +0,0 @@
extends Window
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
show()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
-1
View File
@@ -1 +0,0 @@
uid://cjjiclahlyxii
-90
View File
@@ -1,90 +0,0 @@
extends Button
@onready var youtube_menu_holder: Control = $"../YoutubeMenuHolder"
@onready var youtube_menu: Control = $"../YoutubeMenuHolder/Youtube menu"
@onready var yt_link: LineEdit = $"../YoutubeMenuHolder/Youtube menu/YTLink"
@onready var yt_download: Button = $"../YoutubeMenuHolder/Youtube menu/YTDownload"
@onready var loading_img: Sprite2D = $"../YoutubeMenuHolder/Youtube menu/LoadingIMG"
var currentlyExtending:bool
var Target:float = 50
var downloadList:bool = false
signal ContinueProcess
@onready var Parent:MainScene = get_tree().root.get_child(3)
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
YtDlp.setup_completed.connect(YTSetupCompleted)
yt_download.pressed.connect(DownloadYTVidFromLink)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
if currentlyExtending:
youtube_menu.position.x = clamp(lerp(youtube_menu.position.x,Target,0.25),0,100)
else:
youtube_menu.position.x -=1
youtube_menu.position.x = clamp(lerp(Target,youtube_menu.position.x,1.25),0,100)
youtube_menu.modulate.a = youtube_menu.position.x / Target
if youtube_menu.position.x > 1:
youtube_menu.show()
else:
youtube_menu.hide()
func YTSetupCompleted():
if owner.ShowInstallAlerts:
OS.alert("Youtube setup completed, from now on its safe to close the app","youtube setup")
loading_img.hide()
yt_download.disabled = false
func DownloadPlaylistConf():
downloadList = true
ContinueProcess.emit()
func DownloadSingleSongConf():
ContinueProcess.emit()
func DownloadYTVidFromLink():
if yt_link.text.is_empty():
OS.alert("please gimme a link")
return
if "list=" in yt_link.text:
Parent.playlist_or_song.show()
Parent.playlist_or_song.confirmed.connect(DownloadPlaylistConf)
Parent.playlist_or_song.canceled.connect(DownloadSingleSongConf)
await ContinueProcess
print(yt_link.text)
var download:YtDlp.Download = YtDlp.download(yt_link.text)
if download == null:
OS.alert("youtube setup has not finished, please wait for the finish notification")
return
loading_img.show()
yt_link.clear()
download.set_destination(owner.PlaylistsLocation[owner.CurrentPlaylist])
print(owner.PlaylistsLocation[owner.CurrentPlaylist])
download.convert_to_audio(YtDlp.Audio.MP3)
download._download_playlist = downloadList
download.start()
yt_download.disabled = true
download.completely_finished.connect(DownloadCompleted)
func DownloadCompleted():
yt_download.disabled = false
owner.GetSongs(owner.PlaylistsLocation[owner.CurrentPlaylist])
loading_img.hide()
func _on_toggled(toggled_on: bool) -> void:
if !YtDlp.is_setup():
yt_download.disabled = true
if YtDlp.FilesMissing():
print("Need to install")
owner.ShowInstallAlerts = true
OS.alert("ONE TIME SETUP, PLEASE DONT CLOSE THE MUSIC PLAYER","yt-dl and ffmpeg setup")
YtDlp.setup()
loading_img.show()
if toggled_on:
currentlyExtending = true
youtube_menu.position.x = 1
else:
currentlyExtending = false
-1
View File
@@ -1 +0,0 @@
uid://chdf40dyj73pq
+11
View File
@@ -0,0 +1,11 @@
<Project Sdk="Godot.NET.Sdk/4.5.0-beta.5">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="TagLibSharp" Version="2.3.0" />
</ItemGroup>
</Project>
+19
View File
@@ -0,0 +1,19 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Simplaudio", "Simplaudio.csproj", "{D869D04B-1ECD-4CD8-96F7-7619B5841351}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
ExportDebug|Any CPU = ExportDebug|Any CPU
ExportRelease|Any CPU = ExportRelease|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D869D04B-1ECD-4CD8-96F7-7619B5841351}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D869D04B-1ECD-4CD8-96F7-7619B5841351}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D869D04B-1ECD-4CD8-96F7-7619B5841351}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
{D869D04B-1ECD-4CD8-96F7-7619B5841351}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
{D869D04B-1ECD-4CD8-96F7-7619B5841351}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
{D869D04B-1ECD-4CD8-96F7-7619B5841351}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
EndGlobalSection
EndGlobal
+2 -2
View File
@@ -11,8 +11,8 @@ config_version=5
[application]
config/name="Simplaudio"
run/main_scene="res://Scenes/Main.tscn"
config/features=PackedStringArray("4.4", "Forward Plus")
run/main_scene="uid://mfcbf2sfino6"
config/features=PackedStringArray("4.5", "C#", "Forward Plus")
run/low_processor_mode=true
boot_splash/bg_color=Color(0, 0, 0, 1)
boot_splash/use_filter=false