Esempio n. 1
0
        /// <summary>
        /// Toggle fullscreen at the current mouse position for the window with the specified type.
        /// </summary>
        public static bool ToggleFullscreenAtMousePosition(Type windowType, bool showTopToolbar, bool triggeredOnPlayStateChange)
        {
            EditorWindow mouseOverWin = GetMouseOverWindow();

            if (mouseOverWin != null && (windowType == null || mouseOverWin.GetType() == windowType || mouseOverWin.GetWindowType() == windowType))
            {
                return(EditorFullscreenState.ToggleFullscreen(mouseOverWin.GetType(), true, EditorInput.MousePosition, showTopToolbar, triggeredOnPlayStateChange));
            }
            else if (windowType != null)
            {
                return(EditorFullscreenState.ToggleFullscreen(windowType, EditorInput.MousePosition, showTopToolbar, triggeredOnPlayStateChange));
            }
            return(false);
        }
Esempio n. 2
0
 /// <summary>
 /// Toggle fullscreen for a window type, on the screen at a position.
 /// </summary>
 /// <param name="windowType">The type of the window to create a fullscreen for.</param>
 /// <param name="atPosition">Fullscreen will be toggled on the screen which is at this position.</param>
 /// <param name="showTopToolbar">Show the top toolbar by default if opening a fullscreen.</param>
 /// <returns>True if the window type became fullscreen. False if fullscreen was exited.</returns>
 public static bool ToggleFullscreen(Type windowType, Vector2 atPosition, bool showTopToolbar)
 {
     return(EditorFullscreenState.ToggleFullscreen(windowType, atPosition, showTopToolbar, false));
 }
Esempio n. 3
0
 /// <summary>
 /// Toggle fullscreen for a window type, on the screen at a position. Shows the toolbar if applicable.
 /// </summary>
 /// <param name="windowType">The type of the window to create a fullscreen for.</param>
 /// <param name="atPosition">Fullscreen will be toggled on the screen which is at this position.</param>
 /// <returns>True if the window type became fullscreen. False if fullscreen was exited.</returns>
 public static bool ToggleFullscreen(Type windowType, Vector2 atPosition)
 {
     return(EditorFullscreenState.ToggleFullscreen(windowType, atPosition, true, false));
 }
Esempio n. 4
0
 /// <summary>
 /// Toggle fullscreen for a window type (Creates a new fullscreen window if none already exists).
 /// Enters fullscreen on the primary screen.
 /// </summary>
 /// <param name="windowType">The type of the window to create a fullscreen for.</param>
 /// <returns>True if the window type became fullscreen. False if fullscreen was exited.</returns>
 public static bool ToggleFullscreen(Type windowType)
 {
     return(EditorFullscreenState.ToggleFullscreen(windowType));
 }