Difference between revisions of "Screen Settings"

From TRCCompSci - AQA Computer Science
Jump to: navigation, search
(Created page with "=Fullscreen= It is very easy to turn on fullscreen in monogame: _graphics.IsFullScreen = true; _graphics.ApplyChanges(); Obviously it is also easy to turn off: _graphic...")
(No difference)

Revision as of 11:49, 26 May 2024

Fullscreen

It is very easy to turn on fullscreen in monogame:

_graphics.IsFullScreen = true;
_graphics.ApplyChanges();

Obviously it is also easy to turn off:

_graphics.IsFullScreen = false;
_graphics.ApplyChanges();

You could even just toggle it instead:

_graphics.IsFullScreen = !_graphics.IsFullScreen ;
_graphics.ApplyChanges();

Setting Resolution

You can set the width and height of the main window in pixels:

_graphics.PreferredBackBufferWidth = 1024;
_graphics.PreferredBackBufferHeight = 600;
_graphics.ApplyChanges();

You can therefore also use this in fullscreen as well.