settings stuff

This commit is contained in:
Bucket Of Chicken
2025-10-03 15:51:35 +02:00
parent 30282d5ba3
commit 4424b10cda
6 changed files with 70 additions and 9 deletions
+20 -2
View File
@@ -1,6 +1,7 @@
[gd_scene load_steps=4 format=3 uid="uid://bam5mbsffdryc"]
[gd_scene load_steps=5 format=3 uid="uid://bam5mbsffdryc"]
[ext_resource type="Script" uid="uid://cohxe7s2pd123" path="res://Scripts/SourceDisplay.cs" id="1_24osb"]
[ext_resource type="Texture2D" uid="uid://dwvy6crqhardn" path="res://Icons/Dropdown.png" id="2_wqeof"]
[sub_resource type="LabelSettings" id="LabelSettings_84l0p"]
font_size = 20
@@ -12,7 +13,7 @@ font_color = Color(0.791999, 0.791999, 0.791999, 1)
shadow_size = 2
shadow_color = Color(0, 0, 0, 0.564706)
[node name="SourceDisplay" type="Control"]
[node name="SourceDisplay" type="Control" node_paths=PackedStringArray("NameLabel", "PathLabel", "CheckButtonButton")]
custom_minimum_size = Vector2(0, 75)
layout_mode = 3
anchors_preset = 15
@@ -23,6 +24,9 @@ offset_bottom = -573.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_24osb")
NameLabel = NodePath("HBoxContainer/VBoxContainer/Name")
PathLabel = NodePath("HBoxContainer/VBoxContainer/Path")
CheckButtonButton = NodePath("HBoxContainer/CheckBox")
[node name="Panel" type="Panel" parent="."]
layout_mode = 1
@@ -66,4 +70,18 @@ text_overrun_behavior = 3
[node name="CheckBox" type="CheckBox" parent="HBoxContainer"]
layout_mode = 2
size_flags_vertical = 4
text = "Enabled"
[node name="MenuButton" type="MenuButton" parent="HBoxContainer"]
custom_minimum_size = Vector2(20, 0)
layout_mode = 2
icon = ExtResource("2_wqeof")
expand_icon = true
item_count = 3
popup/item_0/text = "Delete"
popup/item_0/id = 0
popup/item_1/text = "Rename"
popup/item_1/id = 1
popup/item_2/text = "Change Directory"
popup/item_2/id = 2
+25 -2
View File
@@ -1,4 +1,4 @@
[gd_scene load_steps=20 format=3 uid="uid://mfcbf2sfino6"]
[gd_scene load_steps=22 format=3 uid="uid://mfcbf2sfino6"]
[ext_resource type="Texture2D" uid="uid://0jo87vtoeheu" path="res://Images/pole2.jpg" id="1_6bp64"]
[ext_resource type="Texture2D" uid="uid://df2e70jxwrmjs" path="res://Icons/BackOne.png" id="1_8gbba"]
@@ -15,6 +15,7 @@
[ext_resource type="Script" uid="uid://y1d7cbmhmllf" path="res://Scripts/SourcetabUI.cs" id="5_wsu2k"]
[ext_resource type="PackedScene" uid="uid://bam5mbsffdryc" path="res://Scenes/SourceDisplay.tscn" id="7_h1bgf"]
[ext_resource type="Script" uid="uid://ci5h1wwbedkbt" path="res://Scripts/UIManager.cs" id="12_6iyac"]
[ext_resource type="Texture2D" uid="uid://1rstn6r2wisy" path="res://Icons/X.png" id="12_b3802"]
[ext_resource type="Texture2D" uid="uid://dumymuj4w4si0" path="res://Icons/shuffle.png" id="13_jkdf5"]
[ext_resource type="Texture2D" uid="uid://ch8wymyxftkb3" path="res://Icons/Pause.png" id="14_jkdf5"]
@@ -32,6 +33,15 @@ func update(on:bool):
showbutton.visible = on != true
"
[sub_resource type="GDScript" id="GDScript_fevyy"]
resource_name = "gdsd"
script/source = "extends Button
@export var source:Control
func _pressed() -> void:
source.hide()
"
[sub_resource type="GDScript" id="GDScript_d1ilt"]
resource_name = "Slider"
script/source = "extends VSlider
@@ -210,12 +220,25 @@ layout_mode = 2
layout_mode = 2
theme_override_constants/separation = 6
[node name="RichTextLabel" type="RichTextLabel" parent="Padding/VBoxContainer/Center/HSplitContainer/Sources/Panel/VBoxContainer/AddSource/AddNew"]
[node name="HBoxContainer" type="HBoxContainer" parent="Padding/VBoxContainer/Center/HSplitContainer/Sources/Panel/VBoxContainer/AddSource/AddNew"]
layout_mode = 2
[node name="RichTextLabel" type="RichTextLabel" parent="Padding/VBoxContainer/Center/HSplitContainer/Sources/Panel/VBoxContainer/AddSource/AddNew/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 4
text = "ADD_SOURCE"
fit_content = true
scroll_active = false
[node name="HideBuen" type="Button" parent="Padding/VBoxContainer/Center/HSplitContainer/Sources/Panel/VBoxContainer/AddSource/AddNew/HBoxContainer" node_paths=PackedStringArray("source")]
custom_minimum_size = Vector2(22, 0)
layout_mode = 2
icon = ExtResource("12_b3802")
expand_icon = true
script = SubResource("GDScript_fevyy")
source = NodePath("../../..")
[node name="LineEdit" type="LineEdit" parent="Padding/VBoxContainer/Center/HSplitContainer/Sources/Panel/VBoxContainer/AddSource/AddNew"]
layout_mode = 2
placeholder_text = "NAME"
+11
View File
@@ -11,3 +11,14 @@ public partial class SimplaudioSettings : Resource{
Sources = new Dictionary<String, bool>();
}
}
public partial class Source(String SourcePath, String SourceName) : Resource
{
[Export] public String Path = SourcePath;
[Export] public String Name = SourceName;
}
public partial class SimplaudioSave : Resource{
[Export] public Source[] Sources;
}
+10 -3
View File
@@ -3,7 +3,14 @@ using System;
public partial class SourceDisplay : Control
{
[Export] public Label NameLabel;
[Export] public Label PathLabel;
[Export] public CheckButton CheckButtonButton;
[Export] public Label NameLabel;
[Export] public Label PathLabel;
[Export] public CheckBox CheckButtonButton;
public Source source;
public override void _Ready()
{
base._Ready();
NameLabel.Text = source.Name;
PathLabel.Text = source.Path;
}
}
+4 -1
View File
@@ -12,7 +12,7 @@ public partial class SourcetabUI : Node
[Export] public FileDialog Dialog;
[Export] public Control SourceContainer;
[Export] public PackedScene SourceScene;
String Directory;
String Directory = "";
public override void _Ready()
{
base._Ready();
@@ -21,6 +21,7 @@ public partial class SourcetabUI : Node
Dialog.DirSelected += DirSelected;
DirOpenButton.Pressed += ShowDialog;
AddButton.Pressed += Add;
Adder.Hide();
}
void AddSource(){
Adder.Show();
@@ -60,6 +61,8 @@ public partial class SourcetabUI : Node
}
void Add(){
SourceDisplay NewSource = (SourceDisplay)SourceScene.Instantiate();
Source sauce = new Source(Directory, Namer.Text);
NewSource.source = sauce;
SourceContainer.AddChild(NewSource);
Adder.Hide();
}
-1
View File
@@ -1 +0,0 @@
,bucket,cachyos-x8664,28.09.2025 14:46,file:///home/bucket/.var/app/org.libreoffice.LibreOffice/config/libreoffice/4;