private static void EditSaveMode(AdventureDataControl adventureData, Rect rect) { bool newValue; using (new GUILayout.VerticalScope(GUILayout.ExpandWidth(true))) { EditorGUIUtility.labelWidth = rect.width - 30; EditorGUILayout.LabelField(TC.get("MenuAdventure.SaveMode"), EditorStyles.boldLabel); EditorGUILayout.HelpBox(TC.get("MenuAdventure.SaveMode.Info"), MessageType.Warning); if (CheckedField("MenuAdventure.ShowSaveLoad", adventureData.isShowSaveLoad(), out newValue)) { adventureData.setShowSaveLoad(newValue); } if (CheckedField("MenuAdventure.ShowReset", adventureData.isShowReset(), out newValue)) { adventureData.setShowReset(newValue); } if (CheckedField("MenuAdventure.AutoSave", adventureData.isAutoSave(), out newValue)) { adventureData.setAutoSave(newValue); } if (CheckedField("MenuAdventure.SaveOnSuspend", adventureData.isSaveOnSuspend(), out newValue)) { adventureData.setSaveOnSuspend(newValue); } if (CheckedField("MenuAdventure.RestoreAfterOpen", adventureData.isRestoreAfterOpen(), out newValue)) { adventureData.setRestoreAfterOpen(newValue); } } }
private static void EditSaveMode(AdventureDataControl adventureData) { EditorGUILayout.LabelField(TC.get("MenuAdventure.SaveMode"), EditorStyles.boldLabel); EditorGUI.BeginChangeCheck(); var newAutoSave = EditorGUILayout.Toggle(TC.get("MenuAdventure.AutoSave.Checkbox"), adventureData.isAutoSave()); if (EditorGUI.EndChangeCheck()) { adventureData.setAutoSave(newAutoSave); } EditorGUI.BeginChangeCheck(); var newSaveOnSuspend = EditorGUILayout.Toggle(TC.get("MenuAdventure.SaveOnSuspend.Checkbox"), adventureData.isSaveOnSuspend()); if (EditorGUI.EndChangeCheck()) { adventureData.setSaveOnSuspend(newSaveOnSuspend); } }