I am using the ‘ultimate’ config.lua from here
http://www.coronalabs.com/blog/2012/12/04/the-ultimate-config-lua-file/
It successfully scales items as expected. I’m also using the Widget Candy scaling code :
[lua]
local physicalW = math.round( (display.contentWidth - display.screenOriginX*2) / display.contentScaleX)
local physicalH = math.round( (display.contentHeight - display.screenOriginY*2) / display.contentScaleY)
_G.isTablet = false; if physicalW >= 1024 or physicalH >= 1024 then isTablet = true end
_G.GUIScale = _G.isTablet == true and .5 or 1.0
[/lua]
I have a list widget defined :
[lua]
_G.GUI.NewList(
{
x = “center”,
y = 40,
width = “100%”,
scale = _G.GUIScale,
height = “83%”,
parentGroup = Screen,
caption = “”,
theme = “theme_5”,
name = “LST_A”,
list = ListMain,
allowDelete = false,
scrollbar = “always”,
border = {“normal”, 255,0, 0},
onSelect = gotoSceneListDetail,
[/lua]
and a button widget :
[lua]
_G.GUI.NewButton(
{
x = “center”,
y = “bottom”,
width = “auto”,
scale = _G.GUIScale,
name = “BUT_ADD”,
parentGroup = Screen,
theme = “theme_5”,
caption = “Add Instrument”,
textAlign = “center”,
icon = 13,
onRelease = gotoSceneAddGuitar,
} )
[/lua]
I was expecting the layout to be similar (percentage wise) on the iPhone 4 and iPhone 5 (and iPads) however they aren’t.
iPhone 4
iPhone5
The list widget looks about right. The button seem too small and is certainly in the wrong place, its too high. Any idea how I can get a more consistent look for both devices?