Files
slate32/sdcard/apps/Hello/main.lua
evan 01dfc4b458 refactor: capitalize app directory names
The directory name is what the status bar and the launcher cards display, so Home,
Hello and Settings read as titles without a lookup table. Updates the firmware's home
path, the launcher's self-exclusion and the host tests that load the settings app.

Also brings the bar's next repaint forward when an app renames itself or the frame
rotates. The bar still decides what changed; this only stops the answer waiting most of
a second for the next tick.
2026-08-02 13:20:19 -04:00

25 lines
714 B
Lua

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