Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- monitor = peripheral.wrap("monitor_21")
- backColor = fs.open("background", "r")
- color = backColor.readLine()
- color = math.floor(color)
- backColor.close()
- shell.exit("screen")
- monW, monH = monitor.getSize()
- monitor.setTextScale(1.5)
- term.redirect(monitor)
- function draw()
- monitor.setBackgroundColor(color)
- monitor.clear()
- logo = paintutils.loadImage("logo")
- paintutils.drawImage(logo,29 , 8)
- monitor.setBackgroundColor(colors.gray)
- monitor.setTextColor(colors.white)
- monitor.setCursorPos(29, 17)
- monitor.write(" RaysonTech ")
- monitor.setCursorPos(30, 18)
- monitor.write(" Systems ")
- monitor.setBackgroundColor(color)
- monitor.setCursorPos(1, 3)
- monitor.write("ME System Stats")
- monitor.setCursorPos(1, 5)
- monitor.write("Power Resources")
- monitor.setCursorPos(1, 7)
- monitor.write("Security")
- monitor.setCursorPos(41, 22)
- monitor.setBackgroundColor(colors.green)
- monitor.write(" REBOOT ")
- monitor.setCursorPos(1, 22)
- monitor.setBackgroundColor(colors.black)
- monitor.write("SETTINGS ")
- monitor.setBackgroundColor(color)
- end
- function handle()
- event, side, posX, posY = os.pullEvent("monitor_touch")
- sleep(0.1)
- if posY == 4 or posY == 3 then
- shell.run("meSys")
- shell.exit()
- end
- if posY == 5 or posY == 6 then
- shell.run("power")
- shell.exit()
- end
- if posY == 7 or posY == 8 then
- shell.run("security")
- shell.exit()
- end
- if (posY == 22 or posY == 23) and (posX >= 41) then
- os.reboot()
- end
- if (posY == 22 or posY == 23) and (posX <= 10) then
- shell.run("settings")
- shell.exit()
- end
- end
- draw()
- handle()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement