View difference between Paste ID: S49RgAr2 and m5xS49FC
SHOW: | | - or go back to the newest paste.
1
os.loadAPI("ComputercraftButtonAPI")
2
function red(state)
3
	if state then
4
	 redstone.setBundledOutput("back",colors.combine(redstone.getBundledOutput("back"),colors.red))
5
	else
6
  redstone.setBundledOutput("back",colors.subtract(redstone.getBundledOutput("back"), colors.red)) 
7
	end
8
end
9
10
function white(state)
11
 if state then
12
  redstone.setBundledOutput("back",colors.combine(redstone.getBundledOutput("back"),colors.white))
13
 else
14
 redstone.setBundledOutput("back",colors.subtract(redstone.getBundledOutput("back"), colors.white))
15
   end
16
end  
17
18-
function orange(state)
18+
19
green = colors.green
20-
  redstone.setBundledOutput("back",colors.combine(redstone.getBundledOutput("back"),colors.orange))
20+
21
22-
 redstone.setBundledOutput("back",colors.subtract(redstone.getBundledOutput("back"), colors.orange))
22+
23
redButton = ComputercraftButtonAPI.createNewButton(4, 4, "Lighting", green, red, true, red)
24
list = {redButton, whiteButton}
25
26-
function magenta(state)
26+
27
28-
  redstone.setBundledOutput("back",colors.combine(redstone.getBundledOutput("back"),magenta.white))
28+
29
monitor.setTextScale(0.5)
30-
 redstone.setBundledOutput("back",colors.subtract(redstone.getBundledOutput("back"), magenta.white))
30+
31
ComputercraftButtonAPI.drawButtons(monitor, list)
32
while true do
33
	ComputercraftButtonAPI.checkButtonsPressed(monitor, list, 0, print)
34-
function lightBlue(state)
34+
35