Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- event, side, xPos, yPos = os.pullEvent("monitor_touch")
- side = "back"
- mon = peripheral.wrap( side )
- peripheral.call( side, "clear" )
- function writeCenter(text, y, mon)
- local w, h = mon.getSize() or term.getSize()
- if mon then
- mon.setCursorPos( math.ceil( w/2 - #text/2 + 1 ), y )
- mon.write( text )
- else
- term.setCursorPos( math.ceil( w/2 - #text/2 ), y )
- term.write( text )
- end
- end
- mon.setTextColor( colors.green )
- writeCenter( "[Farminfo] ", 2, mon )
- mon.setTextColor( colors.yellow )
- writeCenter( "Geoffs Status:", 3, mon )
- mon.setTextColor( colors.red )
- writeCenter( "Not available", 4, mon )
- mon.setBackgroundColor( colors.white )
- mon.setTextColor ( colors.black )
- writeCenter( "[Refresh]", 9, mon )
- writeCenter( "[Start Turtle]", 11, mon )
- mon.setBackgroundColor( colors.black )
- mon.setTextColor ( colors.white )
- while true do
- if yPos == 11 and xPos > 3 and xPos < 19 then
- mon.setCursorPos(1,12)
- mon.write("Turtle wird gestartet!")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment