21 lines
398 B
Lua
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)
|