This commit is contained in:
James 2023-12-07 01:36:15 +00:00
parent 9f885bc84b
commit 8eadc217b4
2 changed files with 7 additions and 0 deletions

View File

@ -11,6 +11,8 @@ func _ready():
first_child = false # Set flag to false after processing the first child
func populate_paste():
var current_selection = $VBoxContainer/Paste.get_item_text($VBoxContainer/Paste.selected)
$VBoxContainer/Paste.clear()
var dir = DirAccess.open("user://saves/")
var file_names = []
@ -25,8 +27,12 @@ func populate_paste():
dir.list_dir_end()
file_names.sort() # Sort the file names
var index=0
for f in file_names:
$VBoxContainer/Paste.add_item(f)
if f==current_selection:
$VBoxContainer/Paste.selected=index
index+=1
else:
print("An error occurred when trying to access the path.")

View File

@ -147,6 +147,7 @@ layout_mode = 2
size_flags_horizontal = 10
[node name="Decay" type="CheckBox" parent="ScreenOverlay/HUD/HBoxContainer/Right"]
visible = false
layout_mode = 2
text = "Decay"