IOS device orientation question: Is this THAT easy?

Hello guys,

Today I started working on screen orientation on my game. The game play’s on landscape mode. I started missing around with orientation runtime listener but get strange results. I then change my builds.settings from (a subset):
[lua]settings = {
orientation =
{
default = “landscapeLeft”,

},
…[/lua]
to:

[lua]settings = {
orientation =
{
default = “landscapeLeft”,

supported =
{
“landscapeRight”,“landscapeLeft”,
},

…[/lua]

And it worked!! All i needed was that the player sees the game upright wether his/her holding the device in landscape mode with the home button left or right. It works great on the device and was wondering if I was doing it the right away? Could it be that simple as adding the supported ={…} line?

Any suggestions will be appreciated it. If that all I needed to do then I can jut move on on my next todo list item!

Thanks guys.

Mo.

ps: when would use the orientation runtime listener then? I can see that there is an shadow rotating around the screen when rotating the device but my game elements just switch without any animation (which I am fine with that) So, if I wanted to use animation on my game elements (buttons, …)when rotating the device, would that be a good use of the orientation listener?

},
[import]uid: 100814 topic_id: 26427 reply_id: 326427[/import]

Hi Mo,

Yep, it really IS that easy. :slight_smile:

The difference between this method and using a Runtime orientation listener is basically a matter of personal preference (and how picky you are). As you noticed, this simple method basically just “swaps” the view 180 degrees, while a black shadowbox rotates around.

Using a Runtime listener, you could smoothly rotate the entire screen and every object within it as a whole.

Personally, I use the simple method. It’s easy, virtually automatic, and requires no additional Runtime listener. Listeners take processor power (maybe a small amount, but some). And I never take processor power if the task doesn’t really warrant it. I can’t imagine any end user of my apps caring if the screen rotates smoothly or just swaps 180 degrees.

Brent Sorrentino
Ignis Design
[import]uid: 9747 topic_id: 26427 reply_id: 107213[/import]

WOW! Thank you so much Brent for the confirmation. Love it, there is some much to do before releasing an app, this is one more think I do not have to worry:)

THANKS.

Mo [import]uid: 100814 topic_id: 26427 reply_id: 107225[/import]