SHOW:
|
|
- or go back to the newest paste.
1 | os.loadAPI("touch") | |
2 | - | mon = peripheral.wrap("right") |
2 | + | mon = peripheral.find("monitor") |
3 | rednet.open("top") | |
4 | mon.setTextScale(0.5) | |
5 | local t1 = touch.new("right") | |
6 | local t = t1 | |
7 | ||
8 | function writeButtons() | |
9 | - | t1:add ("N-1", nil, 2, 2, 16, 8, colors.gray, colors.cyan) |
9 | + | t1:add ("Appel", nil, 2, 2, 16, 8, colors.gray, colors.cyan) |
10 | - | t1:add ("RDC", nil, 18, 2, 32, 8, colors.gray, colors.cyan) |
10 | + | |
11 | t:draw() | |
12 | end | |
13 | ||
14 | writeButtons() | |
15 | function Checkclick(p1) | |
16 | if p1 == "Appel" then | |
17 | - | if p1 == "N-1" then |
17 | + | |
18 | end | |
19 | end | |
20 | - | if p1 == "RDC" then |
20 | + | |
21 | - | rednet.broadcast("RDC") |
21 | + | |
22 | - | |
22 | + | |
23 | while true do | |
24 | local event, p1 = t:handleEvents(os.pullEvent()) | |
25 | if event == "button_click" then | |
26 | t:flash(p1) | |
27 | Checkclick(p1) | |
28 | end | |
29 | end | |
30 |