public static bool DoEditorDisabledGUI() { if (EditorApplication.isPlaying && SkillEditorSettings.DisableEditorWhenPlaying) { GUILayout.Label(Strings.Label_Editor_disabled_when_playing, new GUILayoutOption[0]); SkillEditorSettings.DisableEditorWhenPlaying = !GUILayout.Toggle(!SkillEditorSettings.DisableEditorWhenPlaying, Strings.Label_Enable_Editor_When_Playing, new GUILayoutOption[0]); if (GUI.changed) { SkillEditorSettings.SaveSettings(); } return(SkillEditorSettings.DisableEditorWhenPlaying); } return(false); }
private static bool DoToolWindowsDisabledGUI() { if (SkillEditorGUILayout.DoEditorDisabledGUI()) { return(true); } if (EditorApplication.isPlaying && SkillEditorSettings.DisableToolWindowsWhenPlaying) { GUILayout.Label(Strings.Label_Tool_Windows_disabled_when_playing, new GUILayoutOption[0]); SkillEditorSettings.DisableToolWindowsWhenPlaying = !GUILayout.Toggle(!SkillEditorSettings.DisableToolWindowsWhenPlaying, Strings.Label_Enable_Tool_Windows_When_Playing, new GUILayoutOption[0]); if (GUI.changed) { SkillEditorSettings.SaveSettings(); } return(SkillEditorSettings.DisableToolWindowsWhenPlaying); } return(false); }
public void OnGUI() { float num = SkillEditor.Window.position.width - 350f; EditorGUILayout.BeginHorizontal(EditorStyles.toolbar, new GUILayoutOption[] { GUILayout.Width(num) }); MainToolbar.DoFsmSelectorGUI(); MainToolbar.DoPrefabTypeGUI(); GUILayout.FlexibleSpace(); bool flag = GUILayout.Toggle(SkillEditorSettings.GraphViewShowMinimap, SkillEditorContent.MainToolbarShowMinimap, EditorStyles.toolbarButton, new GUILayoutOption[0]); if (flag != SkillEditorSettings.GraphViewShowMinimap) { SkillEditorSettings.GraphViewShowMinimap = flag; SkillEditorSettings.SaveSettings(); } EditorGUILayout.EndHorizontal(); }
protected virtual void OnEnable() { SkillEditorSettings.LoadSettings(); this.justEnabled = true; }
public static void ToggleShowHints() { SkillEditorSettings.ShowHints = !SkillEditorSettings.ShowHints; SkillEditorSettings.SaveSettings(); SkillEditor.RepaintAll(); }