private void OnGUI()
 {
     EditorGUILayout.LabelField(EditorGUIUtility.TempContent("Current Mode"), EditorGUIUtility.TempContent(EditorModes.CurrentModeName));
     using (new EditorGUILayout.HorizontalScope())
     {
         GUILayout.FlexibleSpace();
         if (!(EditorModes.Current is DefaultEditorMode) && GUILayout.Button(EditorGUIUtility.TempContent($"Return to {EditorModes.DefaultMode.Name}")))
         {
             EditorModes.RequestDefaultMode();
         }
         GUILayout.FlexibleSpace();
     }
 }
Esempio n. 2
0
 public void RegisterAsUnsupported(Type editorWindowType)
 {
     EditorModes.RegisterAsUnsupported <TMode>(m_Mode, editorWindowType);
 }
Esempio n. 3
0
 public void RegisterAsPassthrough(Type editorWindowType)
 {
     EditorModes.RegisterAsPassthrough <TMode>(m_Mode, editorWindowType);
 }
Esempio n. 4
0
 public void RegisterOverride <TOverride>(Type editorWindowType)
     where TOverride : EditorWindowOverride <EditorWindow>, new()
 {
     EditorModes.RegisterOverride <TMode, TOverride>(m_Mode, editorWindowType);
 }
Esempio n. 5
0
 public void RegisterOverride <TOverride, TWindow>()
     where TOverride : EditorWindowOverride <TWindow>, new()
     where TWindow : EditorWindow
 {
     EditorModes.RegisterOverride <TMode, TOverride, TWindow>(m_Mode);
 }
 private void ReturnToDefault()
 {
     EditorModes.RequestDefaultMode();
 }