Hey there,
I’ve been using Corona sdk to develop games and am currently working on multiple projects. I’ve been going through the docs and came across these two variables related to display API, safeScreenOriginX and safeScreenOriginY. It says they return the distance from left and top side of “safe area” to the left and and top side of the content area respectively. This is a pretty useful feature offered by corona which comes handy while setting the placements of UI elements in the game in order to account for devices with various aspect ratios.
Going by the aforementioned description the values of safeScreenOriginY and safeScreenOriginX for a device has to be same. But what surprises me is that the values change when I change the orientation of the game. For instance, when I print their values in 2 different projects, one portrait and another landscape, the values are very different for the same device. To throw some more light, when I tried printing the values of safeScreenOriginY and safeScreenOriginX using an iphone 4s simulator, the values for the portrait game were 55 and -69.5 respectively and for the landscape game, 13.91 and 0 respectively. I was expecting that the values would simply get swapped when the orientation is changed from portrait to landscape but that wasn’t the case.
Not sure if I entirely understand what they mean by “safe area”, but if someone could help me do away with this confusion, I’d be delighted : )