mirror of https://github.com/Hilbis/Hilbish
Compare commits
No commits in common. "c0f34fd784d2bd41ccff1d631387d3c83923eed3" and "b266c31bb894008fbc7efa74a7cab09a8a9b1ca3" have entirely different histories.
c0f34fd784
...
b266c31bb8
|
@ -105,15 +105,15 @@ ansikit.format = function(text)
|
||||||
end
|
end
|
||||||
|
|
||||||
ansikit.getCode = function(code, terminate)
|
ansikit.getCode = function(code, terminate)
|
||||||
return string.char(0x001b) .. code ..
|
return string.char 0x001b .. code ..
|
||||||
(terminate and string.char(0x001b) .. '\\' or '')
|
(terminate and string.char 0x001b .. '\\' or '')
|
||||||
end
|
end
|
||||||
|
|
||||||
ansikit.getCSI = function(code, endc)
|
ansikit.getCSI = function(code, endc)
|
||||||
endc = (endc and endc or 'm')
|
endc = (endc and endc or 'm')
|
||||||
code = (code and code or '')
|
code = (code and code or '')
|
||||||
|
|
||||||
return string.char(0x001b) .. '[' .. code .. endc
|
return string.char 0x001b .. '[' .. code .. endc
|
||||||
end
|
end
|
||||||
|
|
||||||
ansikit.hideCursor = function()
|
ansikit.hideCursor = function()
|
||||||
|
@ -141,7 +141,7 @@ ansikit.println = function(text)
|
||||||
end
|
end
|
||||||
|
|
||||||
ansikit.reset = function()
|
ansikit.reset = function()
|
||||||
return ansikit.printCode('c')
|
return ansikit.printCode 'c'
|
||||||
end
|
end
|
||||||
|
|
||||||
ansikit.restoreCursor = function()
|
ansikit.restoreCursor = function()
|
||||||
|
@ -149,7 +149,7 @@ ansikit.restoreCursor = function()
|
||||||
end
|
end
|
||||||
|
|
||||||
ansikit.restoreState = function()
|
ansikit.restoreState = function()
|
||||||
return ansikit.printCode(8)
|
return ansikit.printCode 8
|
||||||
end
|
end
|
||||||
|
|
||||||
ansikit.rgb = function(r, g, b)
|
ansikit.rgb = function(r, g, b)
|
||||||
|
@ -157,7 +157,7 @@ ansikit.rgb = function(r, g, b)
|
||||||
g = (g and g or 0)
|
g = (g and g or 0)
|
||||||
b = (b and b or 0)
|
b = (b and b or 0)
|
||||||
|
|
||||||
return ansikit.printCSI('38;2;' .. r .. ';' .. g .. ';' .. b)
|
return ansikit.printCSI '38;2;' .. r .. ';' .. g .. ';' .. b
|
||||||
end
|
end
|
||||||
|
|
||||||
ansikit.saveCursor = function()
|
ansikit.saveCursor = function()
|
||||||
|
@ -165,11 +165,11 @@ ansikit.saveCursor = function()
|
||||||
end
|
end
|
||||||
|
|
||||||
ansikit.saveState = function()
|
ansikit.saveState = function()
|
||||||
return ansikit.printCode(7)
|
return ansikit.printCode 7
|
||||||
end
|
end
|
||||||
|
|
||||||
ansikit.setTitle = function(text)
|
ansikit.setTitle = function(text)
|
||||||
return ansikit.printCode(']2;' .. text, true)
|
ansikit.printCode (']2;' .. text, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
ansikit.showCursor = function()
|
ansikit.showCursor = function()
|
||||||
|
|
Loading…
Reference in New Issue