daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- PaintDemoBasic.lua
  2. -- Author: Mikael Kindborg
  3. -- Date: 2011-02-23
  4. -- Description: Simple paint program demo. Supports multi-touch!
  5.  
  6. -- Fill background.
  7. Screen.setColor(255, 255, 255)
  8. Screen.fillRect(0, 0, Screen.getWidth(), Screen.getHeight())
  9. Screen.update()
  10.  
  11. function Paint(x, y, touchId)
  12.   if touchId == 0 then
  13.     Screen.fillRect(0, 0, 0)
  14.   else
  15.     Screen.fillRect(0, 200, 0)
  16.   end
  17.   maFillRect(x - 20, y - 20, 40, 40)
  18.   Screen.update()
  19. end
  20.  
  21. System.onTouchDown(Paint)
  22. System.onTouchDrag(Paint)
RAW Paste Data
Top