Advertisement
Guest User

Kyra

a guest
Jul 29th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.24 KB | None | 0 0
  1. --Variables
  2. mon = peripheral.wrap("top")
  3. _dt = paintutils.loadImage("/backgrounds/dt")
  4.  
  5.  
  6. --Functions
  7.  
  8. drawDeskTop = function()
  9.   term.clear()
  10.   paintutils.drawImage(_dt, 1, 1)
  11. end
  12.  
  13. Event = function()
  14.   while true do
  15.   event, side, x, y = os.pullEvent()
  16.     if redstone.testBundledInput("back", colors.magenta) then
  17.       term.clear()
  18.       term.setCursorPos(5, 1)
  19.       mon.setTextScale(0.5)
  20.       mon.setTextColor(colors.purple)
  21.       print("M e n u")
  22.       term.setCursorPos(5, 3)
  23.       mon.setTextColor(colors.white)
  24.       print("Reactor")
  25.     end
  26.     if redstone.testBundledInput("back", colors.cyan) then
  27.       init()
  28.     end
  29.     if event == "monitor_touch" then
  30.       if x >= 5 and x <= 11 then
  31.         term.clear()
  32.         term.setCursorPos(1, 1)
  33.         print("Das ist der Reaktor control")
  34.       end
  35.     end
  36.    
  37.     --if event == "monitor_touch" then
  38.       --backButton()
  39.       --end
  40.     --end
  41.   end
  42. end
  43.  
  44. backButton = function()
  45.   term.setCursorPos(8, 10)
  46.   term.write("Back")
  47. end
  48.  
  49. init = function()
  50.   GutenTag()
  51.   drawDeskTop()
  52.   Event()
  53. end
  54.  
  55. GutenTag = function()
  56.   term.clear()
  57.   term.setCursorPos(1, 1)
  58.   textutils.slowPrint("Guten Tag, ich bin Kyra.")
  59.   sleep(1.5)
  60. end
  61.  
  62.  
  63. --Main
  64.  
  65. init()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement