Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- modem = peripheral.wrap("back")
- mainMenu = true
- menuStargate = false
- function TouchScreen()
- term.setBackgroundColor(colors.black)
- local event, side, arg1, arg2 = os.pullEvent()
- if event == "mouse_click" then
- if (arg1 > 8 and arg1 < 19) and
- (arg2 > 0 and arg2 < 2) then
- menuStargate = false
- menuDoors = false
- mainMenu = true
- elseif (arg1 > 1 and arg1 < 12) and
- (arg2 > 5 and arg2 < 7) and
- mainMenu == true then
- mainMenu = false
- menuDoors = true
- elseif (arg1 > 1 and arg1 < 12) and
- (arg2 > 6 and arg2 < 8) and
- mainMenu == true then
- mainMenu = false
- menuStargate = true
- end
- end
- end
- while true do
- TouchScreen()
- term.clear()
- term.setBackgroundColor(colors.black)
- term.setCursorPos(1,1)
- term.setTextColor(colors.white)
- print("O------O O------O")
- print("| O----------O |")
- print("| |")
- print("O------------------------O")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("| |")
- print("O------------------------O")
- term.setCursorPos(9,1)
- term.setTextColor(colors.green)
- print("\\Tablette/")
- if mainMenu == true then
- term.setCursorPos(7,3)
- term.setTextColor(colors.blue)
- print("Menu Principal")
- -----------
- term.setCursorPos(2,6)
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.cyan)
- print(" Portes ")
- term.setCursorPos(2,7)
- term.setTextColor(colors.white)
- term.setBackgroundColor(colors.orange)
- print(" Stargate ")
- elseif menuStargate == true then
- term.setCursorPos(10,3)
- term.setTextColor(colors.orange)
- print("Stargate")
- elseif menuDoors == true then
- term.setCursorPos(11,3)
- term.setTextColor(colors.cyan)
- print("Portes")
- end
- sleep(0.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment