Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- rednet.open("top")
- m = peripheral.wrap("back")
- m.clear()
- m.write("Menu des lancement:")
- function button1() button.toggleButton("Luncher 1")
- rednet.broadcast("up")
- button.toggleButton("Luncher 1")
- end
- function button2() button.toggleButton("Luncher 2")
- rednet.broadcast("up2")
- button.toggleButton("Luncher 2")
- end
- end
- function button3() button.toggleButton("Luncher 3")
- rednet.broadcast("up3")
- button.toggleButton("Luncher 3")
- end
- function button4() button.toggleButton("Luncher 4")
- rednet.broadcast("up4")
- button.toggleButton("Luncher 4")
- end
- function ecran()
- button.setTable("Luncher 1",button1,8,25,3,3)
- button.setTable("Luncher 2",button2,8,25,6,6)
- button.setTable("Luncher 3",button3,8,25,6,6)
- button.setTable("Luncher 4",button4,8,25,6,6)
- button.screen()
- end
- function getClick()
- event,side,x,y = os.pullEvent("monitor_touch")
- button.checkxy(x,y)
- end
- ecran()
- while true do getClick() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement