Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tx,ty = term.getSize()
- id = os.getComputerID()
- tc = term.isColor()
- local function printCentered(text, y)
- if math.floor(#text/2) == 2 then
- centerx = math.floor((tx - string.len(text))/2)
- end
- centerx = math.floor((tx - string.len(text))/2)
- term.setCursorPos(centerx,y)
- print(text)
- end
- function drawTab()
- term.setCursorPos(1,1)
- print("ID: "..id)
- --help()
- end
- function drawTitle(title)
- if tc then
- term.setTextColor(colors.red)
- printCentered(title,3)
- term.setTextColor(colors.white)
- else
- printCentered(title,3)
- end
- end
- function drawMenu(options)
- local tnum = table.getn(options)
- for i in ipairs(options) do
- printCentered(options[i],i+4)
- end
- end
- function select(number,selection)
- local index = number + 4
- printCentered("> "..selection.." <",index)
- end
- --[[
- function help()
- helptxt = ("Use the arrow keys to navigate")
- if tx - 7 < string.len(helptxt) then
- term.setCursorPos(tx-string.len(helptxt),1)
- print(helptxt)
- end
- --]]
- function exe(selection)
- end
Add Comment
Please, Sign In to add comment