Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap ("top")
- function Screen()
- mon.clear()
- mon.setBackgroundColor(colors.red)
- mon.setCursorPos(8,1)
- mon.write("Fusselcraft Bahnhof Ziel - Auswahl")
- mon.setBackgroundColor(colors.black)
- mon.setCursorPos(14,3)
- mon.write(" ===> Dörfli")
- mon.setCursorPos(13,3)
- mon.setTextColor(colors.lightBlue)
- mon.write("1")
- mon.setTextColor(colors.white)
- mon.setCursorPos(14,5)
- mon.write(" ===> Pilzingen")
- mon.setCursorPos(13,5)
- mon.setTextColor(colors.lightBlue)
- mon.write("2")
- mon.setTextColor(colors.white)
- mon.setCursorPos(14,7)
- mon.write(" ===> XP Maschine")
- mon.setCursorPos(13,7)
- mon.setTextColor(colors.lightBlue)
- mon.write("3")
- mon.setTextColor(colors.white)
- mon.setCursorPos(14,9)
- mon.write(" ===> Versuchsgelände")
- mon.setCursorPos(13,9)
- mon.setTextColor(colors.lightBlue)
- mon.write("4")
- mon.setTextColor(colors.white)
- mon.setCursorPos(14,11)
- mon.write(" ===> Linie 4")
- mon.setCursorPos(13,11)
- mon.setTextColor(colors.lightBlue)
- mon.write("5")
- mon.setTextColor(colors.white)
- mon.setCursorPos(14,13)
- mon.write(" ===> Red Mountains")
- mon.setCursorPos(13,13)
- mon.setTextColor(colors.lightBlue)
- mon.write("6")
- mon.setTextColor(colors.white)
- mon.setCursorPos(14,15)
- mon.write(" ===> Viehzucht")
- mon.setCursorPos(13,15)
- mon.setTextColor(colors.lightBlue)
- mon.write("7")
- mon.setTextColor(colors.white)
- mon.setCursorPos(14,17)
- mon.write(" ===> Rundfahrt Erntemaschine")
- mon.setCursorPos(13,17)
- mon.setTextColor(colors.lightBlue)
- mon.write("8")
- mon.setTextColor(colors.white)
- mon.setCursorPos(1,19)
- mon.setBackgroundColor(colors.red)
- mon.write("Bitte die Nummer des gewünschten Ziels anklicken !")
- mon.setBackgroundColor(colors.black)
- end
- function Auslesen()
- event,side,x,y = os.pullEvent()
- if event == "monitor_touch" then
- if x == 13 and y == 3 then
- Screen()
- mon.setBackgroundColor(colors.lime)
- mon.setCursorPos(13,3)
- mon.write("1 ===> Dörfli")
- mon.setBackgroundColor(colors.black)
- rs.setBundledOutput("back", colors.white)
- end
- if x == 13 and y == 5 then
- Screen()
- mon.setBackgroundColor(colors.lime)
- mon.setCursorPos(13,5)
- mon.write("2 ===> Pilzingen")
- mon.setBackgroundColor(colors.black)
- rs.setBundledOutput("back", colors.orange)
- end
- if x == 13 and y == 7 then
- Screen()
- mon.setBackgroundColor(colors.lime)
- mon.setCursorPos(13,7)
- mon.write("3 ===> XP Maschine")
- mon.setBackgroundColor(colors.black)
- rs.setBundledOutput("back", colors.magenta)
- end
- if x == 13 and y == 9 then
- Screen()
- mon.setBackgroundColor(colors.lime)
- mon.setCursorPos(13,9)
- mon.write("4 ===> Versuchsgelände")
- mon.setBackgroundColor(colors.black)
- rs.setBundledOutput("back", colors.lightBlue)
- end
- if x == 13 and y == 11 then
- Screen()
- mon.setBackgroundColor(colors.lime)
- mon.setCursorPos(13,11)
- mon.write("5 ===> Linie 4")
- mon.setBackgroundColor(colors.black)
- rs.setBundledOutput("back", colors.yellow)
- end
- if x == 13 and y == 13 then
- Screen()
- mon.setBackgroundColor(colors.lime)
- mon.setCursorPos(13,13)
- mon.write("6 ===> Red Mountains")
- mon.setBackgroundColor(colors.black)
- rs.setBundledOutput("back", colors.lime)
- end
- if x == 13 and y == 15 then
- Screen()
- mon.setBackgroundColor(colors.lime)
- mon.setCursorPos(13,15)
- mon.write("7 ===> Viehzucht")
- mon.setBackgroundColor(colors.black)
- rs.setBundledOutput("back", colors.pink)
- end
- if x == 13 and y == 17 then
- Screen()
- mon.setBackgroundColor(colors.lime)
- mon.setCursorPos(13,17)
- mon.write("8 ===> Rundfahrt Erntemaschine")
- mon.setBackgroundColor(colors.black)
- rs.setBundledOutput("back", colors.gray)
- end
- end
- end
- Screen()
- while true do
- Auslesen()
- end
Advertisement
Add Comment
Please, Sign In to add comment