Esempio n. 1
0
        /// <summary>
        /// Returns true if a window type is fullscreen on the screen at the specified position.
        /// </summary>
        public static bool WindowTypeIsFullscreenOnScreenAtPosition(Type windowType, Vector2 atPosition)
        {
            bool isFullscreen = false;

            //Main Window
            if (windowType == mainWindowType)
            {
                return(EditorMainWindow.IsFullscreenAtPosition(atPosition));
            }

            var wins = Resources.FindObjectsOfTypeAll <EditorWindow>();

            foreach (var editorWin in wins)
            {
                if (editorWin.GetType() == windowType || editorWin.GetWindowType() == windowType)
                {
                    var winState = FindWindowState(editorWin);
                    if (winState.IsFullscreen)
                    {
                        if (editorWin.GetContainerPosition().Contains(atPosition) && editorWin.IsFullscreen())
                        {
                            isFullscreen = true;
                            break;
                        }
                    }
                }
            }
            return(isFullscreen);
        }
Esempio n. 2
0
        /// <summary>
        /// Returns true if a window type is fullscreen on the screen specified by the options for opening that window type.
        /// </summary>
        public static bool WindowTypeIsFullscreenAtOptionsSpecifiedPosition(Type windowType)
        {
            var fullscreenOptions = EditorFullscreenSettings.GetFullscreenOptionsForWindowType(windowType);

            //Main Window
            if (windowType == mainWindowType)
            {
                return(EditorMainWindow.IsFullscreenAtPosition(GetOptionsSpecifiedFullscreenOpenAtPosition(null, windowType, fullscreenOptions)));
            }

            //Any Other Editor Window
            return(WindowTypeIsFullscreenAtOptionsSpecifiedPosition(windowType, fullscreenOptions));
        }