UI code reorganizing
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
extends PanelContainer
|
||||
|
||||
@onready var auto_save_slot = $MarginContainer/VBoxContainer/AutoSaveSlot
|
||||
@onready var back = $MarginContainer/VBoxContainer/Back
|
||||
|
||||
var save_slot = []
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
|
||||
save_slot.resize(Globals.save_slot_count + 1) #Resizes save_slot
|
||||
|
||||
#Connecting signals
|
||||
back.pressed.connect(func(): self.hide())
|
||||
|
||||
#Sets up save_slot array
|
||||
for i in range(1, Globals.save_slot_count + 1): #Goes from 1 to 4
|
||||
var slot_path = "MarginContainer/VBoxContainer/SaveSlot" + str(i)
|
||||
save_slot[i] = get_node(slot_path)
|
||||
Reference in New Issue
Block a user