Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("left")
- m.clear()
- m.setCursorPos(2,1)
- m.setTextColor(512)
- m.write("Bienvenu dans mon Menu V1.0")
- m.setCursorPos(9,2)
- m.write("De:RubikCuber")
- m.setCursorPos(1,3)
- m.setTextColor(2)
- m.write("Liste des Programes:")
- mouseWidth = 0
- mouseHeight = 0
- m.setCursorPos(1,4)
- w,h=m.getSize()
- print(w)
- print(h)
- m.setTextColor(8192)
- m.setCursorPos(1,4)
- m.write("CADlumiere")
- m.setCursorPos(12,4)
- m.write("ShutDown")
- function checkClickPosition()
- if mouseWidth > 1 and mouseWidth < 8 and mouseHeight == 4 then
- shell.run("CADlumiere")
- elseif mouseWidth > 1 and mouseWidth < 8 and mouseHeight == 4 then
- os.shutdown()
- end
- end
- repeat
- event,p1,p2,p3 = os.pullEvent()
- if event=="monitor_touch" then
- mouseWidth = p2
- mouseHeight = p3
- checkClickPosition()
- end
- until event=="char" and p1==("x")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement