Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- PaintDemoBasic.lua
- -- Author: Mikael Kindborg
- -- Date: 2011-02-23
- -- Description: Simple paint program demo. Supports multi-touch!
- -- Fill background.
- Screen.setColor(255, 255, 255)
- Screen.fillRect(0, 0, Screen.getWidth(), Screen.getHeight())
- Screen.update()
- function Paint(x, y, touchId)
- if touchId == 0 then
- Screen.fillRect(0, 0, 0)
- else
- Screen.fillRect(0, 200, 0)
- end
- maFillRect(x - 20, y - 20, 40, 40)
- Screen.update()
- end
- System.onTouchDown(Paint)
- System.onTouchDrag(Paint)
Add Comment
Please, Sign In to add comment