I guess, the tutorial I’m watching now might be out-of-date. Because there’s a guy typing this code:
– most commonly used screen coordinates
centerX = display.contentCenterX
centerY = display.contentCenterY
screenLeft = display.screenOriginX
screenWidth = display.contentWidth - screenLeft * 2
screenRight = screenLeft + screenWidth
screenTop = display.screenOriginY
screenHeight = display.contentHeight - screenTop * 2
screenBottom = screenTop + screenHeight
display.contentWidth = screenWidth
display.contentHeight = screenHeight
– create a background
local sky = display.newRect( screenLeft, screenTop, screenWidth, screenHeight )
sky:setFillColor ( 0, 25, 111 )
And he gets the Rect in the center! I double checked everything and still getting the Rect fitted between the left upper conner and the center of the screen. Could you please explain why this happens? Thank you!