1
0
mirror of https://github.com/kepler155c/opus synced 2025-12-18 14:18:06 +00:00

generalized canvas

This commit is contained in:
kepler155c@gmail.com
2017-10-05 13:07:48 -04:00
parent 8e381d3ebf
commit 19ed191086
8 changed files with 467 additions and 354 deletions

View File

@@ -2,6 +2,8 @@ local Util = require('util')
local Terminal = { }
local _sgsub = string.gsub
function Terminal.scrollable(ct, size)
local size = size or 25
@@ -108,7 +110,10 @@ function Terminal.toGrayscale(ct)
local function translate(s)
if s then
s = s:gsub("%d+", bcolors)
for k,v in pairs(bcolors) do
s = _sgsub(s, k, v)
end
-- s = _sgsub(s, "%d+", bcolors) -- not working in cc 1.75 ???
end
return s
end