Another brick in the wall.
Is there a way to set the screen offsets? If the logical resolutions are set to 320x480 and the player is set to 480x800 with the "Fit Width" settings, the width is 320, but the height in an similar aspect ratio is set and then centered. Can we remove the centering to have the top of the device as 0? Currently with this scaling 0 goes off the screen and logicalTranslateY()/2 is the offset, it involves a whole bit of extra calculations.
The question is can we set the alignment of the screen when scaling is in play?
Comments
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
The first is "No Scale - Top-Left"
The second is "No Scale - Centered"
The third is "Fit Width"
and The fourth is "Fit Height"
It is the physical distribution of the pixels and that cannot be fixed with setY(), the offset that is returned by getLogicalTranslateY() can only correct so much.
If the negative value from getLogicalTranslateY() was not applied, then the screen looks like as in the firth picture. Look at image 3 and image 5.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
stage:setY(-application:getLogicalTranslateY()/application:getLogicalScaleY())
Will that work for you?
However, thanks for the above, it is an acceptable fix till such time that the system/@Atilim can fix something.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
On the other hand, if a custom control changes the scaling mode, it will alter the whole application. Users may not want this.
Author of Learn Lua for iOS Game Development from Apress ( http://www.apress.com/9781430246626 )
Cool Vizify Profile at https://www.vizify.com/oz-apps
I may be misunderstanding something though, rather new to this (mobile/Gideros)