1
0
Fork 0
mirror of https://github.com/ctruLua/ctruLua.git synced 2025-10-27 16:39:29 +00:00
ctruLua/sdcard/ctruLua/main.lua

21 lines
No EOL
402 B
Lua

local gfx = require("ctr.gfx")
local hid = require("ctr.hid")
local x = 0
local y = 0
while os.run() do
local keys = hid.read()
if keys.down.start then return end
if keys.held.right then x = x + 1 end
if keys.held.left then x = x - 1 end
if keys.held.up then y = y - 1 end
if keys.held.down then y = y + 1 end
gfx.rectangle(x, y, 10, 10)
gfx.rectangle(240, 150, 120, 10)
gfx.render()
end