Retina Text Different Y-coordinates

Nick I’m doing exactly same thing but Corona should fix this.

This my solution:

main.lua:
[lua]retinaDisplay = false
if display.contentScaleX < 1.0 or display.contentScaleY < 1.0 then retinaDisplay = true end
rety = function() if retinaDisplay then return 2 end return 0 end[/lua]

When I’m creating a text I simply do this:
[lua]…
textField.y = 15 + rety()[/lua]

[import]uid: 5629 topic_id: 18192 reply_id: 112138[/import]

I would simplify this even more:

rety = 0  
if display.contentScaleX \< 1.0 or display.contentScaleY \< 1.0 then rety = 2 end  

then

...  
textField.y = 15 + rety  

You remove all the overhead of creating a function and all the call stack overhead associated with function calls since a simple variable will do.

[import]uid: 19626 topic_id: 18192 reply_id: 112160[/import]