Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("touch")
- mon = peripheral.wrap("right")
- local t1 = touch.new("right")
- local t = t1
- function writeButtons()
- t1:add ("N-1", nil, 2, 2, 16, 8, colors.gray, colors.cyan)
- t1:add ("RDC", nil, 17, 2, 31, 8, colors.gray, colors.cyan)
- t = t1
- t:draw()
- end
- writeButtons()
- function Checkclick(p1)
- if p1 == "N-1" then
- rednet.send(5, "N-1")
- end
- if p1 == "RDC" then
- rednet.send(6, "RDC")
- end
- end
- while true do
- local event, p1 = t:handleEvents(os.pullEvent())
- if event == "button_click" then
- t:flash(p1)
- Checkclick(p1)
- end
- end
Add Comment
Please, Sign In to add comment