lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


local bgcolor = {255, 255, 255, 255} -- White background color

function clear()
    fill(unpack(bgcolor)) -- Set background fill color
    rect(0, 0, WIDTH, HEIGTH) -- Fill the entire screen
end

...

function draw()
    clear() -- Clear the screen
    ...
end

This most likely works. XCode probably has a similair function, but I couldn't find any documentation. If you could tell me where you got it from I might be able to help you further.