Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sg = peripheral.wrap("right")
- local favAddresses = {
- {
- title = "",
- address = ""
- }
- }
- local curFuncScreen = nil
- local event, p1, p2, p3 = nil
- function resetScreen()
- term.clear()
- term.setBackgroundColor(colors.gray)
- term.setTextColor(colors.black)
- term.setCursorPos(1, 1)
- end
- function Print(text, x, y, color)
- local prevColor = term.getTextColor()
- term.setTextColor(color)
- term.setCursorPos(x, y)
- term.write(text)
- term.setTextColor(prevColor)
- end
- function Print(text, x, y)
- term.setCursorPos(x, y)
- term.write(text)
- end
- function getCenterX(text)
- local x,_ = term.getSize()
- return (x / 2) - (string.len(text))
- end
- function startup()
- curFuncScreen = startup
- resetScreen()
- Print("Stargate Control Program", getCenterX("Stargate Control Program"), 2)
- end
- function awaitEvent()
- event, p1, p2, p3 = os.pullEvent()
- end
- startup()
- while true do
- awaitEvent()
- curFuncScreen()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement