Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ComputercraftButtonAPI")
- function red(state)
- if state then
- redstone.setBundledOutput("back",colors.combine(redstone.getBundledOutput("back"),colors.red))
- else
- redstone.setBundledOutput("back",colors.subtract(redstone.getBundledOutput("back"), colors.red))
- end
- end
- function white(state)
- if state then
- redstone.setBundledOutput("back",colors.combine(redstone.getBundledOutput("back"),colors.white))
- else
- redstone.setBundledOutput("back",colors.subtract(redstone.getBundledOutput("back"), colors.white))
- end
- end
- green = colors.green
- red = colors.red
- whiteButton = ComputercraftButtonAPI.createNewButton(4, 10, "Cells", green, red, true, white)
- redButton = ComputercraftButtonAPI.createNewButton(4, 4, "Lighting", green, red, true, red)
- list = {redButton, whiteButton}
- monitor = peripheral.wrap("top")
- monitor.setTextScale(0.5)
- ComputercraftButtonAPI.drawButtons(monitor, list)
- while true do
- ComputercraftButtonAPI.checkButtonsPressed(monitor, list, 0, print)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement