Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. function writeColor(b,g,s)
  2. term.setTextColour(b)
  3. term.setBackgroundColour(g)
  4. term.write(s)
  5. term.setTextColour(colours.white)
  6. term.setBackgroundColour(colours.black)
  7. end
  8.  
  9. term.clear()
  10. term.setCursorPos(1,1)
  11.  
  12. pos = {
  13. fold1_pos_x = 1;
  14. fold1_pos_y = 1;
  15. }
  16.  
  17. writeColor(colours.black,colours.yellow,">")
  18.  
  19. menu_fold1_activated = false
  20.  
  21. function menu_fold1()
  22. term.setCursorPos(2,1)
  23. writeColor("Exit")
  24. menu_fold1_activated = true
  25. end
  26.  
  27. while true do
  28. local button, xPos, yPos = os.pullEvent("mouse_click")
  29. if(xPos == 1 and yPos == 1) then
  30. menu_fold1()
  31. end
  32. if(xPos == 1 and yPos == 5 and menu_fold1_activated == true or xPos == 1 and yPos == 6 and menu_fold1_activated == true or xPos == 1 and yPos == 7 and menu_fold1_activated == true or xPos == 1 and yPos == 8 and menu_fold1_activated == true or xPos == 1 and yPos == 9 and menu_fold1_activated == true) then
  33. term.clear()
  34. error("Closed LightweightOS v1.04")
  35. end
  36. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement