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