Please help me and save my sanity.
Im trying to do something really simple. fill the background with a white rectangle. Will it work? No, it fills freaking half the screen.
Here is my config.lua
application = { content = { width = 640, height = 960, fps = 30, xAlign = "center", yAlign = "center", }, }
And here is my main.lua
----------------------------------------------------------------------------------------- -- -- main.lua -- ----------------------------------------------------------------------------------------- local widget = require("widget") local top = display.statusBarHeight local listrecs = {} local namedata = {"James", "Stuart"} local function setup() local bg = display.newRect(0, top, display.contentWidth, (display.contentHeight) - top ) bg:setFillColor(255, 255, 255) end local function loaddata() end local function showrecords() local function onRowRender( event ) end local function rowListener ( event ) end end setup() loaddata() showrecords()
The rectangle fills half the screen. not all of the screen. this fills the screeen
local bg = display.newRect(0, top, display.contentWidth \* 2, (display.contentHeight \* 2) - top )
Please tell me whats going on. When I follow tutorials this is all they do and the simulator shows their box filling the screen. Mine only fills the top left half of the screen, no matter the chosen device.