Issue 336 (#380)
Co-authored-by: Dennis Ploeger <develop@dieploegers.de> Co-authored-by: dploeger <dploeger@users.noreply.github.com>
This commit is contained in:
@@ -14,13 +14,17 @@ func _on_back_pressed():
|
||||
emit_signal("back_button_pressed")
|
||||
|
||||
func refresh_savegames():
|
||||
for slot in $ScrollContainer/slots.get_children():
|
||||
$ScrollContainer/slots.remove_child(slot)
|
||||
for slot in $CenterContainer/VBoxContainer/\
|
||||
ScrollContainer/slots.get_children():
|
||||
$CenterContainer/VBoxContainer/\
|
||||
ScrollContainer/slots.remove_child(slot)
|
||||
|
||||
var saves_list = escoria.save_manager.get_saves_list()
|
||||
for i in saves_list.size():
|
||||
var save_data = saves_list[i+1]
|
||||
var new_slot = slot_ui_scene.instance()
|
||||
$ScrollContainer/slots.add_child(new_slot)
|
||||
$CenterContainer/VBoxContainer/ScrollContainer/slots.add_child(
|
||||
new_slot
|
||||
)
|
||||
new_slot.set_slot_name_date(save_data["name"], save_data["date"])
|
||||
new_slot.connect("pressed", self, "_on_slot_pressed", [i+1])
|
||||
|
||||
Reference in New Issue
Block a user