Advertisement
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("fuel",nil,2,2,8,4, colors.red, colors.blue)
- t=t1
- t:draw()
- end
- writeButtons()
- while true do
- local event, p1 = t:handleEvents(os.pullEvent())
- if event == "button_click" then
- t:toggleButton(p1)
- print(p1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement