Windows Phone - how to set orientation
Monkey Targets Forums/XNA/Windows Phone - how to set orientation
| ||
Hi to all, I´m new in the WP7 .. I´m testing all my app´s and library in a Lumia 800 and 90% are working well ;) thanks for monkey :) I have some troubles with touch, sound and orientation .. I have some ideas to solve Sound and Touch problems .. but any idea in the orientation :( In the emulator I can change the orientation display, but my app continue in the portrait mode .. anyone have some idea where I can set orientation mode in XNA ? thank´s |
| ||
It should be enough to set the resolution in your .build/config.txt. XNA_WINDOW_WIDTH_PHONE=800 XNA_WINDOW_HEIGHT_PHONE=480 WP detects automatically if it's portrait or landscape. |
| ||
not sure if that works but it doesn't appear to using ignition engine. There should be a way of defining which orientations are allowed. |
| ||
once youve started visual studio express 2010 and opened the windows phones copy of monkeygame you can then edit the program.cs .Near the top of the file edit it like volker says and it will set it automatically. |
| ||
will it remember this or will you need to redo it every time you make a change to your monkey program? |
| ||
it will stay that that way |
| ||
To adjust the orientation manually, PresentationParameters.DisplayOrientation needs to be changed manually. Look at gxtkGame.PreparingDeviceSettings in Program.cs For example: pp.DisplayOrientation = DisplayOrientation.Portrait; http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.presentationparameters.displayorientation.aspx |
| ||
does monkey have a way of embedding native code so monkey ignores it and copies it directly into the output project? |