-- Print text in printf(...) style, in a given color function graphicsPrint(text, color) -- modified to allow color selection for i = 1, string.len(text) do char = string.sub(text, i, i) if char == "\n" then y = y + 8 x = xMin elseif char ~= "\r" then frame:print(x, y, char, color) x = x + 8 end end screen:blit(0, 0, frame) screen.waitVblankStart() screen.flip() end -- Print text using graphicsPrint(...) in default color of black function gPrint(text) graphicsPrint(text, black) end