Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor = peripheral.find("monitor")
- local surface = dofile("surface")
- monitor.setTextScale(0.5)
- local w,h = monitor.getSize()
- local screen = surface.create(w,h)
- local display = surface.load("popcorn.nfp")
- screen:drawSurface(display,0,0)
- monitor.setPaletteColor(colors.red, 0xd77b28)
- monitor.setPaletteColor(colors.green, 0xf29d20)
- monitor.setPaletteColor(colors.brown, 0xf3b51f)
- monitor.setPaletteColor(colors.blue, 0xf2b51e)
- monitor.setPaletteColor(colors.purple, 0xf5b523)
- monitor.setPaletteColor(colors.cyan, 0xefb81d)
- monitor.setPaletteColor(colors.lightGray, 0xeeba19)
- monitor.setPaletteColor(colors.gray, 0xceede4)
- monitor.setPaletteColor(colors.pink, 0xa3b2ae)
- monitor.setPaletteColor(colors.lime, 0xccdbd6)
- monitor.setPaletteColor(colors.yellow, 0xb7c5c1)
- monitor.setPaletteColor(colors.lightBlue, 0x97edd4)
- monitor.setPaletteColor(colors.magenta, 0x94a29e)
- monitor.setPaletteColor(colors.orange, 0xe0dbab)
- monitor.setPaletteColor(colors.white, 0xdfcf97)
- screen:output(monitor)
- while true do
- event, side, xPos, yPos = os.pullEvent("monitor_touch")
- if xPos > 2 and xPos < 14 and yPos > 17 and yPos < 24 then
- print("test")
- rs.setAnalogOutput("back", 15)
- sleep(0.5)
- rs.setAnalogOutput("back", 0)
- end
- end
Add Comment
Please, Sign In to add comment