petomka

startup experimental

Mar 30th, 2015
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. local headline = ""
  2. local toppriority = ""
  3. local secondary = ""
  4. local wouldbenice = ""
  5. local alwaystry = ""
  6.  
  7.  
  8.  
  9. function Liste()
  10. -- Headline
  11. term.setTextColor(colors.white)
  12. term.setCursorPos(1,1)
  13. term.write(headline)
  14. -- Toppriority
  15. term.setTextColor(colors.red)
  16. term.setCursorPos(1,3)
  17. term.write(toppriority)
  18. -- secondary
  19. term.setTextColor(colors.orange)
  20. term.setCursorPos(1,5)
  21. term.write(secondary)
  22. -- wouldbenice
  23. term.setTextColor(colors.lime)
  24. term.setCursorPos(1,7)
  25. term.write(wouldbenice)
  26. -- alwaystry
  27. term.setTextColor(colors.white)
  28. term.setCursorPos(1,9)
  29. term.write(alwaystry)
  30. end
  31.  
  32. Liste()
  33.  
  34. function KeyListe()
  35. while true do
  36. local sEvent, param = os.pullEvent("key")
  37. if sEvent == "key" then
  38. if param == 2 then
  39. term.setCursorPos(1,3)
  40. term.setTextColor(colors.green)
  41. term.write(toppriority + "- OK")
  42. KeyListe()
  43. if param == 3 then
  44. term.setCursorPos(1,5)
  45. term.setTextColor(colors.green)
  46. term.write(secondary + "- OK")
  47. KeyListe()
  48. if param == 4 then
  49. term.setCursorPos(1,7)
  50. term.setTextColor(colors.green)
  51. term.write(wouldbenice + "- OK")
  52. KeyListe()
  53. if param == 5 then
  54. term.setCursorPos(1,9)
  55. term.setTextColor(colors.green)
  56. term.write(alwaystry + "- OK")
  57. KeyListe()
  58. end
  59.  
  60. while true do
  61. KeyListe
  62. end
Advertisement
Add Comment
Please, Sign In to add comment