public EditorFullscreenSettings() { //Fullscreen Window Hotkey Defaults mainUnityWindow = new FullscreenOption(this, KeyCode.F8, EventModifiers.None, OpenFullscreenAtPosition.AtMousePosition, true, Vector2.zero, "Main Unity Window", EditorFullscreenState.MainWindowType, true); sceneWindow = new FullscreenOption(this, KeyCode.F10, EventModifiers.None, OpenFullscreenAtPosition.AtMousePosition, true, Vector2.zero, "Scene Window", EditorFullscreenState.SceneViewType, true); gameWindow = new FullscreenOption(this, KeyCode.F11, EventModifiers.None, OpenFullscreenAtPosition.AtMousePosition, false, Vector2.zero, "Game Window", EditorFullscreenState.GameViewType, true, true); currentlyFocusedWindow = new FullscreenOption(this, KeyCode.F9, EventModifiers.None, OpenFullscreenAtPosition.AtMousePosition, true, Vector2.zero, "Currently Focused Window", null, true); windowUnderCursor = new FullscreenOption(this, KeyCode.F9, EventModifiers.Control, OpenFullscreenAtPosition.AtMousePosition, true, Vector2.zero, "Window Under Cursor", null, true); //Other Hotkey Defaults toggleTopToolbar = new FullscreenOption(this, KeyCode.F12, EventModifiers.None, OpenFullscreenAtPosition.None, false, Vector2.zero, "Show/Hide Top Toolbar", null, true); closeAllFullscreenWindows = new FullscreenOption(this, KeyCode.F8, EventModifiers.Control, OpenFullscreenAtPosition.None, false, Vector2.zero, "Close All Fullscreen Windows", null, true); #if UNITY_EDITOR_OSX //Fullscreen Window Hotkey Defaults (OSX) mainUnityWindow.modifiers = EventModifiers.Command; sceneWindow.modifiers = EventModifiers.Command; gameWindow.modifiers = EventModifiers.Command; currentlyFocusedWindow.modifiers = EventModifiers.Command; windowUnderCursor.modifiers = EventModifiers.Alt | EventModifiers.Command; //Other Hotkey Defaults (OSX) toggleTopToolbar.modifiers = EventModifiers.Command; closeAllFullscreenWindows.modifiers = EventModifiers.Alt | EventModifiers.Command; #endif }
public static FullscreenOption GetFullscreenOptionsForWindowType(string windowType) { FullscreenOption fullscreenOptions; if (windowType == EditorFullscreenState.mainWindowType.ToString()) { fullscreenOptions = settings.mainUnityWindow; } else if (windowType == typeof(SceneView).ToString() || windowType == typeof(CustomSceneView).ToString()) { fullscreenOptions = settings.sceneWindow; } else if (windowType == EditorFullscreenState.gameViewType.ToString()) { fullscreenOptions = settings.gameWindow; } else if (windowType == "CurrentlyFocusedWindow") { fullscreenOptions = settings.currentlyFocusedWindow; } else if (windowType == "WindowUnderCursor") { fullscreenOptions = settings.windowUnderCursor; } else { fullscreenOptions = new FullscreenOption(); } return(fullscreenOptions); }
public FullscreenOption GetFullscreenOption(int optionID) { FullscreenOption fullscreenOps = null; if (!customWindowFullscreenOptionsPopulated) { PopulateCustomWindowFullscreenOptions(); customWindowFullscreenOptionsPopulated = true; } fullscreenOptions.TryGetValue(optionID, out fullscreenOps); return(fullscreenOps); }