public void DeleteButtonClicked(FileSelectionViewController controller) { var filename = filenames[selectedIndex]; SimulationSerializer.DeleteSaveFile(filename); selectedIndex = 0; RefreshCache(); }
public void ExportButtonClicked(FileSelectionViewController controller) { var name = filenames[selectedIndex]; string path = SimulationSerializer.PathToSimulationSave(name); FileToSave file = new FileToSave(path, CustomEvolutionFileType.evol); NativeFileSO.NativeFileSO.shared.SaveFile(file); }
public void DidEditTitleAtIndex(FileSelectionViewController controller, int index, string newName) { if (!IsNameAvailable(controller, newName)) { return; } var currentName = filenames[index]; SimulationSerializer.RenameSimulationSave(currentName, newName); RefreshCache(); }
public void DidSelectItem(FileSelectionViewController controller, int index) { selectedIndex = index; }
public int GetIndexOfSelectedItem(FileSelectionViewController controller) { return(selectedIndex); }
public string GetTitleForItemAtIndex(FileSelectionViewController controller, int index) { return(creatureNames[index]); }
public int GetNumberOfItems(FileSelectionViewController controller) { return(creatureNames.Count); }
public string GetEmptyMessage(FileSelectionViewController controller) { return("You haven't saved any creature designs yet"); }
// MARK: - FileSelectionViewControllerDelegate public string GetTitle(FileSelectionViewController controller) { return("Creature Designs"); }
public void LoadButtonClicked(FileSelectionViewController controller) { var filename = filenames[selectedIndex]; StartCoroutine(LoadOnNextFrame(filename)); }
public bool IsNameAvailable(FileSelectionViewController controller, string newName) { return(!SimulationSerializer.SimulationSaveExists(newName)); }
public string GetEmptyMessage(FileSelectionViewController controller) { return("You haven't saved any simulations yet"); }
// MARK: - FileSelectionViewControllerDelegate public string GetTitle(FileSelectionViewController controller) { return("Choose a saved simulation"); }