Hello
i have a problem when i enable immersive sticky and cant find a solution
so my goal is to get my ui elements nice and neatly along the side of multiple screen resolutions, so i use display.screenOriginX/Y and display.contentWidth/Height, this works fine until i enable immersive sticky, then i seem to get different results. the ui on left and right edge move a little to the middle f.e.
my config.lua is default, nothing changed - 320 width x 480 height with letterbox scaling
[lua]
local leftSide = display.screenOriginX;
local rightSide = display.contentWidth-display.screenOriginX;
local topSide = display.screenOriginY;
local bottomSide = display.contentHeight-display.screenOriginY;
local totalWidth = display.contentWidth-(display.screenOriginX*2);
local totalHeight = display.contentHeight-(display.screenOriginY*2);
local centerX = display.contentCenterX;
local centerY = display.contentCenterY;
local bg = display.newImageRect( “bg.png”, 570, 360 )
bg.x, bg.y = centerX, centerY
local object = display.newRect(0, 0, 10, 10);
object.x, object.y = leftSide+10+object.contentWidth*0.5, topSide+10+object.contentHeight*0.5;
local object2 = display.newRect(0, 0, 10, 10);
object2.x, object2.y = leftSide+0+object2.contentWidth*0.5, bottomSide-0-object2.contentHeight*0.5;
native.setProperty( “androidSystemUiVisibility”, “immersiveSticky” )
display.setStatusBar( display.HiddenStatusBar )
local function onResize( event )
native.setProperty( “androidSystemUiVisibility”, “immersiveSticky” )
end
Runtime:addEventListener( “resize”, onResize )
[/lua]
thanks in advance