CheckResize() public static method

public static CheckResize ( ) : void
return void
コード例 #1
0
ファイル: Screen.cs プロジェクト: JakeSmokie/SharpQuake
        /// <summary>
        /// SCR_SetUpToDrawConsole
        /// </summary>
        static void SetUpToDrawConsole()
        {
            Con.CheckResize();

            if (_DrawLoading)
            {
                return;     // never a console with loading plaque
            }

            // decide on the height of the console
            Con.ForcedUp = (Client.Cl.worldmodel == null) || (Client.Cls.signon != Client.SIGNONS);

            if (Con.ForcedUp)
            {
                _ConLines   = _VidDef.height; // full screen
                _ConCurrent = _ConLines;
            }
            else if (Key.Destination == keydest_t.key_console)
            {
                _ConLines = _VidDef.height / 2; // half screen
            }
            else
            {
                _ConLines = 0; // none visible
            }

            if (_ConLines < _ConCurrent)
            {
                _ConCurrent -= (int)(_ConSpeed.Value * Host.FrameTime);
                if (_ConLines > _ConCurrent)
                {
                    _ConCurrent = _ConLines;
                }
            }
            else if (_ConLines > _ConCurrent)
            {
                _ConCurrent += (int)(_ConSpeed.Value * Host.FrameTime);
                if (_ConLines < _ConCurrent)
                {
                    _ConCurrent = _ConLines;
                }
            }

            if (_ClearConsole++ < _VidDef.numpages)
            {
                Sbar.Changed();
            }
            else if (ClearNotify++ < _VidDef.numpages)
            {
                //????????????
            }
            else
            {
                Con.NotifyLines = 0;
            }
        }