Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- clear()
- print("Option Selector:")
- print("O - Print A")
- print("O - Print B")
- print("O - Print C")
- while true do
- local event, button, X, Y = os.pullEvent("mouse_click")
- XY = X..","..Y
- if XY == "1,2" then
- -- Do stuff for Option 1
- print("A")
- end
- if XY == "1,3" then
- -- Do stuff for Option 2
- print("B")
- end
- if XY == "1,4" then
- -- Do stuff for Option 3
- print("C")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment