1
0
Fork 0
mirror of https://github.com/ctruLua/ctruLua.git synced 2025-10-28 08:49:30 +00:00

Added ctr.gfx.getFPS, renamed ctr.hid.read to ctr.hid.keys, unload font from memory when exiting and did some cleaning

This commit is contained in:
Reuh 2015-08-19 17:14:02 +02:00
parent bea69d4e30
commit b772a42d28
8 changed files with 42 additions and 19 deletions

View file

@ -9,7 +9,7 @@ local angle = 0
gfx.color.setBackground(gfx.color.RGBA8(200, 200, 200))
while os.run() do
local keys = hid.read()
local keys = hid.keys()
if keys.down.start then return end
@ -37,7 +37,8 @@ while os.run() do
gfx.startFrame(gfx.GFX_BOTTOM)
gfx.color.setDefault(0, 0, 0)
gfx.text(5, 10, "Hello world, from Lua !", 15)
gfx.text(5, 7, "FPS: "..math.ceil(gfx.getFPS()))
gfx.text(5, 20, "Hello world, from Lua !", 20)
gfx.endFrame()