Exemple #1
0
        private void onTriggerDelete(SaveFileItemPanel fileItem)
        {
            var filePath = GlobalPath.save + fileItem.Name + ".save";

            System.IO.File.Delete(filePath);

            fileItem.QueueFree();
        }
Exemple #2
0
 internal void GenerateFileItems(bool enableLoad, Action <string> onTriggerLoad, Action <string> onTriggerDelete)
 {
     foreach (var filePath in System.IO.Directory.EnumerateFiles(GlobalPath.save, "*.save"))
     {
         var fileItem = SaveFileItemPanel.Instance(this, enableLoad, filePath);
         fileItem.actTriggerLoad   = onTriggerLoad;
         fileItem.actTriggerDelete = onTriggerDelete;
     }
 }
Exemple #3
0
 private void onTriggerLoad(SaveFileItemPanel fileItem)
 {
     EmitSignal(nameof(LoadSaveFile), fileItem.Name);
     fileItem.QueueFree();
 }