Ejemplo n.º 1
0
        public override void _Ready()
        {
            newSaveContainter = GetNode <NewSaveContainer>("CenterContainer/PanelContainer/VBoxContainer/NewSaveContainer");
            saveFileContainer = GetNode <SaveFileContainer>("CenterContainer/PanelContainer/VBoxContainer/SaveFileContainer");

            newSaveContainter.Visible = !enableLoad;
            newSaveContainter.buttonConfirm.Connect("pressed", this, nameof(onTriggerSave));

            saveFileContainer.GenerateFileItems(enableLoad, onTriggerLoad, onTriggerDelete);
        }
Ejemplo n.º 2
0
        public override void _Ready()
        {
            newSaveContainter = GetNode <NewSaveContainer>("CenterContainer/PanelContainer/VBoxContainer/NewSaveContainer");
            saveFileContainer = GetNode <SaveFileContainer>("CenterContainer/PanelContainer/VBoxContainer/SaveFileContainer");

            newSaveContainter.Visible = !enableLoad;
            newSaveContainter.buttonConfirm.Connect("pressed", this, nameof(onTriggerSave));

            foreach (var fileItem in saveFileContainer.EnumSaveFileItems())
            {
                fileItem.buttonDelete.Connect("pressed", this, nameof(onTriggerDelete), new Godot.Collections.Array()
                {
                    fileItem
                });
                fileItem.buttonLoad.Connect("pressed", this, nameof(onTriggerLoad), new Godot.Collections.Array()
                {
                    fileItem
                });

                fileItem.buttonLoad.Visible = enableLoad;
            }
        }