Advertisement
Guest User

MyHome

a guest
Apr 24th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.78 KB | None | 0 0
  1. os.loadAPI("System/API/image")
  2.  
  3. local xSize, ySize = term.getSize()
  4.  
  5. local function ClearScr(text)
  6.   local term = peripheral.wrap("monitor_6")
  7.   term.setBackgroundColor(colors.white)
  8.   term.setTextColor(colors.white)
  9.   term.clear()
  10.   term.setBackgroundColor(colors.gray)
  11.   term.setCursorPos(2,1)
  12.   term.clearLine()
  13.   term.setTextScale(1)
  14.   term.write(text)
  15.   image.draw(2,2,"Images/MyHomeIcon")
  16. end
  17. -----------------------------
  18. ClearScr("Home Controlling System by DarkKeks")
  19.  
  20. while true do
  21.   local event, button, x, y = os.pullEvent()
  22.   if event == "monitor_touch" then button = 2 end
  23.   if event == "monitor_touch" then
  24.     if button == 2 and y>1 then
  25.       rs.setBundledOutput("bottom", 1)
  26.     elseif y == 1 then
  27.       break
  28.     end        
  29.   end
  30. end
  31.  
  32. term.clear()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement