2015年4月1日 星期三

[Corona SDK] How to set scale in config.lua?

The resolution for different phones vary a lot.
To solve this problem, Corona SDK use the setting in config.lua to adapt for all situation.
For width and height, you can take them as the initial size of canvas.
The final size of canvas will be decided according the resolution of phone you select.

How about the parameter scale?
When the ratio of width and height for the initial canvas is different from that of phone resolution, the scale setting will affect how system deal with scale up/down.

There have 4 modes we can select:
"none":no effect for the scale option
"letterbox":Will try to show the entire content in the screen while keeping the same aspect ratio.
There may have black bars on the side for this setting.
letterbox

"zoomEven":Will try to fill the entire screen with content while keeping the same aspect ratio. Some content may be cut off.
zoomEven

"zoomStretch":Will try to fill the entire screen with content without keeping the same aspect ratio. That is, the content may be stretched.
zoomStretch

沒有留言:

張貼留言