screen orientation

Hello

I have a game that im messing around with to help me learn lua and corona.  Well its actual multiple mini games in one.

I am using storyboard.gotoScene( “scene1” ) and so on to select the games from a menu screen.

In my build.settings I have this piece of code 

settings = {

    

    orientation = {

        default = “landscapeRight”,

        supported = { “landscapeRight”, “portrait”}

    },

This is because some of the games I want to display in landscape and some in portrait.  However this allows switching between the two orientations, while I only want a fixed orientation in each game.

Is there a line of code that would disable one of them for each game that I can put into that games lua file.

Any help is appreciated

Thanking You

Alan Fletcher

You can choose to lock to a single orientation and then look for “on Orientation” events and rotate all your design elements accordingly.  In your case, I would pick the orientation you’re going to use the most, and then on your fewer games orientation, just design the game with everything rotated.  There is no magic way to do what you want.

You can choose to lock to a single orientation and then look for “on Orientation” events and rotate all your design elements accordingly.  In your case, I would pick the orientation you’re going to use the most, and then on your fewer games orientation, just design the game with everything rotated.  There is no magic way to do what you want.