/** * <summary>Creates a new instance of the 'Save: Manage saves' Action, set to rename a save file</summary> * <param name = "menuName">The name of the menu containing the SavesList element</param> * <param name = "savesListElementName">The name of the SavesList element</param> * <param name = "selectSavlabelGlobalStringVariableID">The ID number of a Global String variable whose value will be used to rename the file with</param> * <param name = "slotIndex">The slot index to rename</param> * <returns>The generated Action</returns> */ public static ActionManageSaves CreateNew_RenameSave(string menuName, string savesListElementName, int labelGlobalStringVariableID, int slotIndex) { ActionManageSaves newAction = (ActionManageSaves)CreateInstance <ActionManageSaves>(); newAction.manageSaveType = ManageSaveType.RenameSave; newAction.selectSaveType = SelectSaveType.SetSlotIndex; newAction.slotVarID = labelGlobalStringVariableID; newAction.menuName = menuName; newAction.elementName = savesListElementName; return(newAction); }
/** * <summary>Creates a new instance of the 'Save: Manage saves' Action, set to delete a save file</summary> * <param name = "menuName">The name of the menu containing the SavesList element</param> * <param name = "savesListElementName">The name of the SavesList element</param> * <param name = "slotIndex">The slot index to delete. If negative, the Autosave will be deleted</param> * <returns>The generated Action</returns> */ public static ActionManageSaves CreateNew_DeleteSave(string menuName, string savesListElementName, int slotIndex = -1) { ActionManageSaves newAction = (ActionManageSaves)CreateInstance <ActionManageSaves>(); newAction.manageSaveType = ManageSaveType.DeleteSave; newAction.selectSaveType = (slotIndex < 0) ? SelectSaveType.Autosave : SelectSaveType.SetSlotIndex; newAction.saveIndex = slotIndex; newAction.menuName = menuName; newAction.elementName = savesListElementName; return(newAction); }