Advertisement
infiniteblock

Untitled

Apr 2nd, 2020
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. --#load the touchpoint API
  2. os.loadAPI("touchpoint")
  3. --# initialize a new button set on the top monitor
  4. local t = touchpoint.new("top")
  5. --# Add a new button
  6. t:add("To get your adventure properly started", nil, 5, 2, 45, 3, colors.black, colors.black)
  7. t:add("click below for a free start kit", nil, 5, 4, 45, 5, colors.black, colors.black)
  8. t:add("Thermal Kit", nil, 5, 6, 17, 8, colors.blue, colors.lightBlue)
  9. t:add("Thaumic Kit", nil, 19, 6, 31, 8, colors.blue, colors.lightBlue)
  10. t:add("Botania Kit", nil, 33, 6, 45, 8, colors.blue, colors.lightBlue)
  11. t:add(" AE2 Kit ", nil, 5, 11, 17, 13, colors.blue, colors.lightBlue)
  12. t:add("You will be teleported upon picking a kit", nil, 3, 17, 47, 18, colors.black, colors.black)
  13. --# draw the buttons
  14. t:draw()
  15. while true do
  16. --# handleEvents will convert monitor_touch events to button_click if it was on a button
  17. local event, p1 = t:handleEvents(os.pullEvent())
  18. if event == "button_click" then
  19. if p1 == "Thermal Kit" then
  20. --# commands for thermal kit
  21. elseif p1 == "Thaumic Kit" then
  22. --# etc.
  23. end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement