Advertisement
Pirnogion

utils

Oct 30th, 2014
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. local palette = {}
  2.  palette["os"]              = {}
  3.  palette["os"]["bg"]        = colors.black
  4.  palette["os"]["txt"]       = colors.white
  5.  
  6.  palette["standart"]        = {}
  7.  palette["standart"]["bg"]  = colors.white
  8.  palette["standart"]["txt"] = colors.black
  9.  
  10.  palette["select"]          = {}
  11.  palette["select"]["bg"]    = colors.white
  12.  palette["select"]["txt"]   = colors.red
  13.  
  14. SetPalette = function(id)
  15.  term.setBackgroundColor(palette[id]["bg"])
  16.  term.setTextColor(palette[id]["txt"])
  17. end
  18.  
  19. FillString = function(str, mxchr)
  20.  local _bf = str
  21.  
  22.  for i = #str, mxchr, 1 do
  23.   _bf = _bf .. " "
  24.  end
  25.  
  26.  return _bf
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement