Kumodatsu

cc_api_scr

Jun 28th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. --VERSION: 11
  2. --PASTEBIN: iTPJazCA
  3.  
  4. --FUNC--
  5.  
  6. w = function()
  7.     w, h = term.getSize()
  8.     return w
  9. end
  10.  
  11. h = function()
  12.     w, h = term.getSize()
  13.     return h
  14. end
  15.  
  16. area = function()
  17.     return term.getSize()
  18. end
  19.  
  20. pos = function(x, y)
  21.     term.setCursorPos(x, y)
  22. end
  23.  
  24. cols = function(sCol, tCol)
  25.     term.setBackgroundColor(sCol)
  26.     txtCol(tCol)
  27. end
  28.  
  29. txtCol = function(col)
  30.     term.setTextColor(col)
  31. end
  32.  
  33. clr = function(col)
  34.     if col ~= nil then
  35.         term.setBackgroundColor(col)
  36.     end
  37.     term.clear()
  38.     pos(1, 1)
  39. end
  40.  
  41. switch = function(arg)
  42.     term.redirect(arg)
  43.     pos(1,1)
  44. end
  45.  
  46. write = function(msg)
  47.     msg = tostring(msg)
  48.     term.write(msg)
  49. end
Add Comment
Please, Sign In to add comment