LuaYard/code/game.lua
2019-08-06 20:37:40 +08:00

21 lines
398 B
Lua

wnd = Window("Hello", 1024, 768)
rnd = Renderer(wnd)
wnd:on('click', function(x, y)
print("Clicked", x, y)
end)
wnd:on('quit', function()
print("before quit")
end)
wnd:on('keydown', function(key)
print("Keydown", key)
wnd:setTimeout(function()
print("timer callback.")
end, 1000)
end)
xpcall(function()
wnd:start()
end, function()
print(debug.traceback())
end)