Advertisement
Guest User

button

a guest
Apr 1st, 2014
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. function touch(xmin,xmax,ymin,ymax)
  2. local b,e,x,y=os.pullEvent("mouse_click")
  3. if e=="mouse_click" then
  4.  if b=="1" then
  5.     if x >= xmin and x <= xmax and y >= ymin and y <= ymax then
  6.        return "c1"
  7.        elseif
  8.         e=="mouse_click" then
  9.           if b=="2" then
  10.             if x>=xmin and x<=xmax and y>=ymin and y<=ymax then
  11.             return "c2"
  12.            else
  13.            end
  14.          end
  15.       end      
  16.     end
  17.   end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement