Microsoft.Xna.Framework.GraphicsDeviceManager.ToggleFullScreen C# (CSharp) Method

ToggleFullScreen() public method

public ToggleFullScreen ( ) : void
return void
        public void ToggleFullScreen() { }
        public void ApplyChanges() { }

Usage Example

コード例 #1
0
ファイル: Configuration.cs プロジェクト: hkeeble/GroupProject
        public Configuration(Game game)
            : base(game)
        {
            graphics = new GraphicsDeviceManager(game);
            Game_Library.Configuration config = game.Content.Load<Game_Library.Configuration>("Interface/Configuration");
            Width = config.Width;
            Height = config.Height;
            Fullscreen = config.Fullscreen;

            if (Fullscreen == true)
            {
                graphics.PreferredBackBufferWidth = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;
                graphics.PreferredBackBufferHeight = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height;
                graphics.ApplyChanges();
                if (graphics.IsFullScreen == false)
                    graphics.ToggleFullScreen();
            }
            else
            {
                graphics.PreferredBackBufferHeight = Height;
                graphics.PreferredBackBufferWidth = Width;
                graphics.ApplyChanges();
                if (graphics.IsFullScreen == true)
                    graphics.ToggleFullScreen();
            }
            game.Window.ClientSizeChanged += new EventHandler<EventArgs>(OnResize);
        }
All Usage Examples Of Microsoft.Xna.Framework.GraphicsDeviceManager::ToggleFullScreen