local ui = require("ui") local seconds = 0 -- Draws straight to the panel rather than through components, so it reads the theme. local theme = ui.theme function init() sys.setTickInterval(1000) gui.clear(theme.bg) gui.drawText("hello from sd card", 10, 10, theme.fg, theme.bg) gui.drawText("touch the screen", 10, 30, theme.muted, theme.bg) log.info("hello app started, screen " .. gui.getWidth() .. "x" .. gui.getHeight()) end function on_tick() seconds = seconds + 1 gui.fillRect(10, 50, 120, 20, theme.bg) gui.drawText("uptime: " .. seconds .. "s", 10, 50, theme.fg, theme.bg) end function on_touch(x, y) log.info("touch at " .. x .. ", " .. y) gui.fillCircle(x, y, 6, theme.accent) end