View difference between Paste ID: 9jcigaGU and xVmKfn2Y
SHOW: | | - or go back to the newest paste.
1
os.loadAPI("button")
2
m = peripheral.wrap("top")
3
m.clear()
4
5
function fillTable()
6-
   button.setTable("Test1", test1, 10,20,3,5)
6+
   button.setTable("Thaumium", test1, 2,16,4,4)
7-
   button.setTable("Test2", test2, 22,32,3,5)
7+
   button.setTable("Nitor", test2, 2,16,6,6)
8-
   button.setTable("Test3", test3, 10,20,8,10)
8+
   button.setTable("Alumentum", test3, 2,16,8,8)
9-
   button.setTable("Test4", test4, 22,32,8,10)
9+
   button.setTable("Tallow", test4, 2,16,10,10)
10
   button.screen()
11
end
12
13
function getClick()
14
   event,side,x,y = os.pullEvent("monitor_touch")
15
   button.checkxy(x,y)
16
end
17
18
function test1()
19-
   button.flash("Test1")
19+
   button.toggleButton("Thaumium")
20-
   print("Test1")
20+
   print("1")
21
end
22
23
function test2()
24-
   button.toggleButton("Test2")
24+
   button.toggleButton("Nitor")
25-
   print("Test2")
25+
   print("2")
26
end
27
28
function test3()
29-
   print("Test3")
29+
   button.toggleButton("Alumentum")
30
   print("3")
31
end
32
33-
   print("Test4")
33+
34
   button.toggleButton("Tallow")
35
   print("4")
36
end
37-
button.heading("Demo Button Prog")
37+
38-
button.label(1,5,"Demo!")
38+
39
--button.heading("Demo Button Prog")
40
button.label(2,2,"Materials")
41
42
while true do
43
   getClick()
44
end