Hi,
i want to display screen border in every devices, but in some devices it doesen’t work, the lines are shifted more to right…
[lua]
local left= display.newLine(0,0,0,display.contentHeight)
left.strokeWidth= 2
local right = display.newLine(display.contentWidth,0,display.contentWidth,display.contentHeight)
right.strokeWidth= 2
local up = display.newLine(0,0,display.contentWidth,0)
up.strokeWidth=2
local down = display.newLine(0,display.contentHeight,display.contentWidth,display.contentHeight)
down.strokeWidth=2
[/lua]
and this is my config.lua that i find in internet…
[lua]
local w, h = display.pixelWidth, display.pixelHeight
local modes = {1, 1.5, 2, 3, 4, 6, 8} – Scaling factors to try
local contentW, contentH = 480, 800 – Minimal size your content can fit in
– Try each mode and find the best one
local _w, _h, _m = w, h, 1
for i = 1, #modes do
local m = modes[i]
local lw, lh = w / m, h / m
if lw < contentW or lh < contentH then
break
else
_w, _h, _m = lw, lh, m
end
end
– If scaling is not pixel perfect (between 1 and 2) - use letterbox
if _m < 2 then
local scale = math.max(contentW / w, contentH / h)
_w, _h = w * scale, h * scale
end
application = {
content = {
width = _w,
height = _h,
scale = ‘letterbox’,
fps = 60,
imageSuffix = {
[’@2x’] = 1.1,
[’@4x’] = 2.1
}
}
}
[/lua]
I want to use 480x800, scaled in every devices, with the lines as screen border…sorry bad english