Last Modified: 2023-05-03

Settings

https://docs.coronalabs.com/guide/distribution/buildSettings/index.html

https://docs.coronalabs.com/guide/distribution/advancedSettings/index.html

When orientation supports both of landscape and portrait, the main content area (a display group) should be translated to the center of screen.

each layers generated from Photoshop has fixed number of coordiate (x, y), for instance the center position of landscape 1920x1080 is at (1920/2, 1080/2) in landscape. If the actual device is rotated to portrait, the center position is (1080/2, 1920/2), for screen rotation event is detected, let’s move each layer by (1920/2 - 1080/2, 1080/2- 1920/2)

  sceneGroup.x, sceneGroup.y = display.contentCenterX, display.contentCenterY


Orientation Implementation

TODO this plugin locks the screen orientation but can not find the document.

   {
        ["plugin.orientation"] = {
            publisherId = "tech.scotth",
        },
    },

TODO save & cancel buttons goes out at the bottom in landscape