Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------ VARIABLES ------
- l = " "
- divL = "___________________________________________________"
- -- COLORS
- c_back = colors.green
- c_text = colors.white
- c_top = colors.gray
- c_error = colors.red
- c_info = colors.cyan
- cx,cy = term.getCursorPos()
- ------ FUNCTIONS -----
- function setPos(x,y) term.setCursorPos(x,y) end
- function bgCol(c) term.setBackgroundColor(c) end
- function fgCol(c) term.setTextColor(c) end
- function blink(b) term.setCursorBlink(b) end
- function tPrint(txt,col)
- fgCol(col)
- print(txt)
- fgCol(c_text)
- end
- function tWrite(txt,col)
- fgCol(col)
- write(txt)
- fgCol(c_text)
- end
- function clear()
- bgCol(c_back)
- term.clear()
- setPos(1,1)
- end
- function draw_line(count,col,div)
- bgCol(col)
- if div == 0 then
- tPrint(l,c_text)
- elseif div == 1 then
- tPrint(divL,c_text)
- end
- bgCol(c_back)
- end
- function draw_menu(y,s)
- setPos(1, y)
- tPrint(" [ PROGRAMS ] ",c_text)
- tPrint(" [ SHELL ] ",c_text)
- tPrint(" [ LUA TERM ] ",c_text)
- tPrint(" [ LOG OUT ] ",c_text)
- tPrint(" [ REBOOT ] ",c_text)
- tPrint(" [ SHUTDOWN ] ",c_text)
- setPos(20,y+s)
- tWrite("<",c_text)
- end
- function draw_home()
- clear()
- bgCol(c_top)
- tPrint("NAPALM OS v1.0.0",c_text)
- draw_line(1,c_top,1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement