Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local n = 0
- local pause = false
- local ontimer = {
- [false] = function ()
- n=n+1
- platform.window: invalidate()
- end
- }
- local onpaint = {
- [false] = function (gc)
- gc: drawString (n, 64, 64)
- end
- , [true] = function (gc)
- gc: drawString ("Paused, dumbass", 64, 64)
- end
- }
- timer.start (.01)
- function on.timer ()
- pcall(ontimer[pause])
- end
- function on.paint(gc)
- onpaint[pause](gc)
- end
- function on.enterKey ()
- pause = not pause
- platform.window: invalidate()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement