Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mon = peripheral.wrap("right")
- local oreProcessor = require("oreProcessor")
- function setPalette()
- mon.setPaletteColor(1,0.6078431372549019,0.6078431372549019,0.6078431372549019)
- mon.setPaletteColor(2,1.0,1.0,1.0)
- mon.setPaletteColor(4,0.6980392156862745,0.6980392156862745,0.6980392156862745)
- mon.setPaletteColor(8,0.7529411764705882,0.7529411764705882,0.7529411764705882)
- mon.setPaletteColor(16,0.23137254901960785,0.20392156862745098,0.1607843137254902)
- mon.setPaletteColor(32,0.34901960784313724,0.34901960784313724,0.34901960784313724)
- mon.setPaletteColor(64,0.0,0.0,0.0)
- mon.setPaletteColor(128,0.996078431372549,0.9333333333333333,0.8901960784313725)
- mon.setPaletteColor(256,0.9098039215686274,0.9098039215686274,0.9098039215686274)
- mon.setPaletteColor(512,0.8470588235294118,0.6862745098039216,0.5764705882352941)
- mon.setPaletteColor(1024,0.6784313725490196,0.5529411764705883,0.4666666666666667)
- mon.setPaletteColor(2048,1.0,0.30980392156862746,0.30980392156862746)
- mon.setPaletteColor(4096,0.5568627450980392,0.17254901960784313,0.17254901960784313)
- end
- function display()
- setPalette()
- mon.setTextScale(0.5)
- local pc = term.redirect(mon)
- mon.clear()
- paintutils.drawImage(paintutils.loadImage("base"),1,1)
- term.redirect(pc)
- end
- function displayImage(fp, x, y)
- setPalette()
- local pc = term.redirect(mon)
- paintutils.drawImage(paintutils.loadImage(fp),x,y)
- term.redirect(pc)
- end
- function start()
- oreProcessor.processOres()
- end
- while true do
- event, side, xPos, yPos = os.pullEvent("monitor_touch")
- print(xPos..", "..yPos)
- if xPos > 26 and xPos < 52 and yPos > 26 and yPos < 32 then
- displayImage("button_pressed",27,27)
- start()
- displayImage("base",1,1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement