Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local x,y = term.getSize()
- function navBar()
- term.setCursorPos(1,y-1)
- write( string.rep( "-", x ) )
- term.setCursorPos(1,y)
- local pages = {}
- function addPage( name, link )
- pages[#pages+1] = {
- ["Name"] = name,
- ["Link"] = link,
- }
- end
- --Add your pages here
- addPage("Home","nexus/index")
- addPage("Contact Us","nexus/contact")
- addPage("Games","nexus/games")
- addPage("Search","nexus/search")
- --End
- if newLink then
- local maxPage = #pages
- for i=1,maxPage do
- local page = pages[i]
- newLink( " " ..page["Name"].. " ", page["Link"] )
- if i ~= maxPage then
- write("|")
- end
- end
- else
- if term.isColor() then
- term.setTextColour( colors.red )
- end
- print("NavBar v1.1 not supported in this version of REX.")
- end
- end
- rednet.broadcast("rednet.api.ping.searchengine")
- cPrint("NeXuS FailSearch v2.0")
- local timez = os.startTimer(0.5)
- repeat
- local event, key, URL = os.pullEvent()
- if event == "rednet_message" then
- cLink( URL )
- end
- until key == timez
- navBar()
Advertisement
Add Comment
Please, Sign In to add comment