Better error handling

This commit is contained in:
2024-07-10 22:52:41 +02:00
parent 43a8ebf800
commit bdc4f51741
4 changed files with 89 additions and 7 deletions

View File

@@ -1,3 +1,22 @@
local lastMessage = 0
function love.draw2()
love.graphics.setBackgroundColor(0, 1, 0)
love.graphics.setBackgroundColor(0, 0, 0)
local time
if lastMessage == 0 then
time = "Never"
else
time = love.timer.getTime() - time "s ago"
end
love.graphics.print("Last message received: " .. time, 5, 5)
end
function love.load()
love.graphics.setFont(love.graphics.newFont(15))
love.window.setFullscreen(true)
end
function love.gamepadpressed(joystick, button)
print("Pressed gamepad button " .. button .. " on joystick " .. joystick:getName())
end