public override void ShowGUI(List <ActionParameter> parameters) { manageSaveType = (ManageSaveType)EditorGUILayout.EnumPopup("Method:", manageSaveType); if (manageSaveType == ManageSaveType.RenameSave) { varID = AdvGame.GlobalVariableGUI("Label as String variable:", varID, VariableType.String); } string _action = "delete"; if (manageSaveType == ManageSaveType.RenameSave) { _action = "rename"; } selectSaveType = (SelectSaveType)EditorGUILayout.EnumPopup("Save to " + _action + ":", selectSaveType); if (selectSaveType == SelectSaveType.SetSlotIndex) { saveIndexParameterID = Action.ChooseParameterGUI("Slot index to " + _action + ":", parameters, saveIndexParameterID, ParameterType.Integer); if (saveIndexParameterID == -1) { saveIndex = EditorGUILayout.IntField("Slot index to " + _action + ":", saveIndex); } } else if (selectSaveType == SelectSaveType.SlotIndexFromVariable) { slotVarID = AdvGame.GlobalVariableGUI("Integer variable:", slotVarID, VariableType.Integer); } else if (selectSaveType == SelectSaveType.Autosave && manageSaveType == ManageSaveType.RenameSave) { EditorGUILayout.HelpBox("The AutoSave cannot be renamed.", MessageType.Warning); AfterRunningOption(); return; } else if (selectSaveType == SelectSaveType.SetSaveID) { saveIndexParameterID = Action.ChooseParameterGUI("Save ID to " + _action + ":", parameters, saveIndexParameterID, ParameterType.Integer); if (saveIndexParameterID == -1) { saveIndex = EditorGUILayout.IntField("Save ID to " + _action + ":", saveIndex); } } if (selectSaveType != SelectSaveType.Autosave && selectSaveType != SelectSaveType.SetSaveID) { EditorGUILayout.Space(); menuName = EditorGUILayout.TextField("Menu with SavesList:", menuName); elementName = EditorGUILayout.TextField("SavesList element:", elementName); } AfterRunningOption(); }
override public void ShowGUI(List <ActionParameter> parameters) { manageSaveType = (ManageSaveType)EditorGUILayout.EnumPopup("Method:", manageSaveType); if (manageSaveType == ManageSaveType.RenameSave) { varID = AdvGame.GlobalVariableGUI("Label as String variable:", varID); if (varID >= 0 && AdvGame.GetReferences() && AdvGame.GetReferences().variablesManager) { GVar _var = AdvGame.GetReferences().variablesManager.GetVariable(varID); if (_var != null && _var.type != VariableType.String) { EditorGUILayout.HelpBox("The chosen Variable must be a String.", MessageType.Warning); } } } string _action = "delete"; if (manageSaveType == ManageSaveType.RenameSave) { _action = "rename"; } selectSaveType = (SelectSaveType)EditorGUILayout.EnumPopup("Save to " + _action + ":", selectSaveType); if (selectSaveType == SelectSaveType.SetSlotIndex) { saveIndexParameterID = Action.ChooseParameterGUI("Slot index to " + _action + ":", parameters, saveIndexParameterID, ParameterType.Integer); if (saveIndexParameterID == -1) { saveIndex = EditorGUILayout.IntField("Slot index to " + _action + ":", saveIndex); } } else if (selectSaveType == SelectSaveType.SlotIndexFromVariable) { slotVarID = AdvGame.GlobalVariableGUI("Integer variable:", slotVarID); if (slotVarID >= 0 && AdvGame.GetReferences() && AdvGame.GetReferences().variablesManager) { GVar _var = AdvGame.GetReferences().variablesManager.GetVariable(slotVarID); if (_var != null && _var.type != VariableType.Integer) { EditorGUILayout.HelpBox("The chosen Variable must be an Integer.", MessageType.Warning); } } } EditorGUILayout.Space(); menuName = EditorGUILayout.TextField("Menu with SavesList:", menuName); elementName = EditorGUILayout.TextField("SavesList element:", elementName); AfterRunningOption(); }
public override void ShowGUI(List<ActionParameter> parameters) { manageSaveType = (ManageSaveType) EditorGUILayout.EnumPopup ("Method:", manageSaveType); if (manageSaveType == ManageSaveType.RenameSave) { varID = AdvGame.GlobalVariableGUI ("Label as String variable:", varID); if (varID >= 0 && AdvGame.GetReferences () && AdvGame.GetReferences ().variablesManager) { GVar _var = AdvGame.GetReferences ().variablesManager.GetVariable (varID); if (_var != null && _var.type != VariableType.String) { EditorGUILayout.HelpBox ("The chosen Variable must be a String.", MessageType.Warning); } } } string _action = "delete"; if (manageSaveType == ManageSaveType.RenameSave) { _action = "rename"; } selectSaveType = (SelectSaveType) EditorGUILayout.EnumPopup ("Save to " + _action + ":", selectSaveType); if (selectSaveType == SelectSaveType.SetSlotIndex) { saveIndexParameterID = Action.ChooseParameterGUI ("Slot index to " + _action + ":", parameters, saveIndexParameterID, ParameterType.Integer); if (saveIndexParameterID == -1) { saveIndex = EditorGUILayout.IntField ("Slot index to " + _action + ":", saveIndex); } } else if (selectSaveType == SelectSaveType.SlotIndexFromVariable) { slotVarID = AdvGame.GlobalVariableGUI ("Integer variable:", slotVarID); if (slotVarID >= 0 && AdvGame.GetReferences () && AdvGame.GetReferences ().variablesManager) { GVar _var = AdvGame.GetReferences ().variablesManager.GetVariable (slotVarID); if (_var != null && _var.type != VariableType.Integer) { EditorGUILayout.HelpBox ("The chosen Variable must be an Integer.", MessageType.Warning); } } } EditorGUILayout.Space (); menuName = EditorGUILayout.TextField ("Menu with SavesList:", menuName); elementName = EditorGUILayout.TextField ("SavesList element:", elementName); AfterRunningOption (); }