Advertisement
Guest User

test

a guest
Oct 31st, 2014
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.56 KB | None | 0 0
  1. term.setBackgroundColor(1)
  2. term.clear()
  3. term.setCursorPos(1,1)
  4. term.setCursorBlink(false)
  5. local event = ""
  6. local key = 0
  7. local x = 0
  8. local y = 0
  9. local img = {{}}
  10. while key ~= 29 do
  11.   event, key, x, y = os.pullEvent()
  12.   if event == "mouse_drag" or event == "mouse_click" then
  13.     term.setCursorPos(x,y)
  14.     if key == 1 then
  15.       term.setBackgroundColor(32768)
  16.     elseif key == 2 then
  17.       term.setBackgroundColor(1)
  18.     end
  19.     term.write(" ")
  20.   end
  21. end
  22. term.setBackgroundColor(32768)
  23. term.clear()
  24. term.setCursorBlink(true)
  25. term.setCursorPos(1,1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement