Window size
by Matt Fischman · in Torque X 2D · 07/24/2007 (7:45 pm) · 3 replies
I cant seem to find this covered anywhere, though I'm sure it must be simple...
How do you change the window size / resolution, say in any of the starters kits? I'm looking to fill up my screen (1280 x 1024). What about full screen?
Thanks.
How do you change the window size / resolution, say in any of the starters kits? I'm looking to fill up my screen (1280 x 1024). What about full screen?
Thanks.
About the author
#2
GraphicsDeviceManager.IsFullScreen = true;
GraphicsDeviceManager.ApplyChanges();
07/26/2007 (4:50 pm)
I figured it out for anyone who is interested...at least, how to go into full screenGraphicsDeviceManager.IsFullScreen = true;
GraphicsDeviceManager.ApplyChanges();
#3
This would only be at launch of the game, so if you wanted to toggle fullscreen during the game you would want to use the code posted above (Matt Fishman's post). Maybe someone can post a way to edit the xml setting above via in-game (like an options gui) and then reload the settings from that xml file so that we could have a code example of handling it that way.
09/17/2007 (2:50 pm)
If you have a torqueSettings.xml file in your project you can add/set the following node (the ... represents other nodes that may already exist in the file, just wanted to show you the xpath to the node that you would need to add/set):<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<TorqueEngineSettings>
...
<WindowsGraphicsManagerSettings>
...
<IsFullScreen>true</IsFullScreen>
</WindowsGraphicsManagerSettings>
...
</TorqueEngineSettings>This would only be at launch of the game, so if you wanted to toggle fullscreen during the game you would want to use the code posted above (Matt Fishman's post). Maybe someone can post a way to edit the xml setting above via in-game (like an options gui) and then reload the settings from that xml file so that we could have a code example of handling it that way.
Torque Owner Vishal Bhanderi