Exemple #1
0
 public GreatGame()
 {
     Console.WriteLine("Game created.");
     client   = Client.Instance;
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory    = "Content";
     Window.Title             = SCREEN_NAME;
     IsMouseVisible           = false;
     Window.AllowUserResizing = false;
     graphics.ApplyChanges();
     ScreenResized = false;
     FailCount     = 0;
     screenInfo    = ScreenInfo.GetInfo();
     GameState     = InitSate.Openning;
 }
Exemple #2
0
        void SetupScreen()
        {
            screenInfo = ScreenInfo.GetInfo();

            if (screenInfo.WindowHeight < 480)
            {
                screenInfo.WindowHeight = 480;
            }
            if (screenInfo.WindowWidth < 800)
            {
                screenInfo.WindowWidth = 800;
            }

            screenInfo.ScreenHeight = GraphicsDevice.DisplayMode.Height;
            screenInfo.ScreenWidth  = GraphicsDevice.DisplayMode.Width;

            screenInfo.SaveInfo();

            graphics.IsFullScreen = screenInfo.Fullscreen;

            if (screenInfo.AutoResolution || graphics.IsFullScreen)
            {
                graphics.PreferredBackBufferWidth  = screenInfo.ScreenWidth;
                graphics.PreferredBackBufferHeight = screenInfo.ScreenHeight;
                screenInfo.WindowWidth             = screenInfo.ScreenWidth;
                screenInfo.WindowHeight            = screenInfo.ScreenHeight;
                screenInfo.SaveInfo();
            }
            else
            {
                graphics.PreferredBackBufferWidth  = screenInfo.WindowWidth;
                graphics.PreferredBackBufferHeight = screenInfo.WindowHeight;
            }

            /*#if DEBUG
             * screenInfo.WindowWidth = 900;
             * screenInfo.WindowHeight = 700;
             * screenInfo.SaveInfo();
             * graphics.PreferredBackBufferWidth = screenInfo.WindowWidth;
             * graphics.PreferredBackBufferHeight = screenInfo.WindowHeight;
             *
             * graphics.IsFullScreen = false;
             #endif*/

            graphics.ApplyChanges();
        }