how can I determine 480X854 or 480X800 ?
thanks a lot ! [import]uid: 21680 topic_id: 16670 reply_id: 316670[/import]
how can I determine 480X854 or 480X800 ?
thanks a lot ! [import]uid: 21680 topic_id: 16670 reply_id: 316670[/import]
get display.contentWidth and display.contentHeight
cheers,
?
[import]uid: 3826 topic_id: 16670 reply_id: 62283[/import]
True but only if contentWidth and contentHeight are not set in config (config.lua file). [import]uid: 50988 topic_id: 16670 reply_id: 62324[/import]
To get actual pixel count use:
[code]
scaleX = tonumber(string.format("%." … (1) … “f”, 1/display.contentScaleX))
scaleY = tonumber(string.format("%." … (1) … “f”, 1/display.contentScaleY))
pixelsX = scaleX * display.contentWidth
pixelsY = scaleY * display.contentHeight
[/code] [import]uid: 8872 topic_id: 16670 reply_id: 63021[/import]