Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loadup = function()
- shell.run("pastebin", "get", "pFHeia96", "touchpoint")
- os.loadAPI("touchpoint")
- print("Touchpoint API Loaded")
- sleep(1)
- term.clear()
- term.setCursorPos(1,1)
- end
- buttonLoads = function()
- local t = touchpoint.new("top")
- t:add("Wither", leftAction, 2, 2, 14, 5, colors.orange, colors.red)
- t:add("Blaze", backAction, 9, 8, 21, 11, colors.gray, colors.red)
- t:add("Spider", rightAction, 16, 2, 28, 5, colors.blue, colors.red)
- t:draw()
- end
- function leftAction()
- t:toggleButton("Wither")
- if rs.getInput("left") == true then
- rs.setOutput("left", false)
- else
- rs.setOutput("left", true)
- end
- end
- function backAction()
- t:toggleButton("Blaze")
- if rs.getInput("back") == true then
- rs.setOutput("back", false)
- else
- rs.setOutput("back", true)
- end
- end
- function rightAction()
- t:toggleButton("Spider")
- if rs.getInput("right") == true then
- rs.setOutput("right", false)
- else
- rs.setOutput("right", true)
- end
- end
- loadup()
- buttonLoads()
- t:run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement