1
0
mirror of https://github.com/LDDestroier/CC/ synced 2024-06-18 11:19:58 +00:00

Added "windont.useSetVisible"

This commit is contained in:
LDDestroier 2020-01-12 02:30:28 -05:00 committed by GitHub
parent 89b3643404
commit 56b6c01ec1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,6 +53,7 @@ lval.to_blit[0], lval.to_colors["-"] = "-", 0
local windont = {
doClearScreen = false, -- if true, will clear the screen during render
useSetVisible = false, -- if true, sets the base terminal's visibility to false before rendering
default = {
baseTerm = term.current(), -- default base terminal for all windows
textColor = "0", -- default text color (what " " corresponds to in term.blit's second argument)
@ -118,6 +119,9 @@ windont.render = function(onlyX1, onlyX2, onlyY, ...)
if bT == output then
bT = output.meta.baseTerm
end
if windont.useSetVisible and bT.setVisible then
bT.setVisible(false)
end
scr_x, scr_y = bT.getSize()
-- try entire buffer transformations
for i = #windows, 1, -1 do
@ -210,6 +214,9 @@ windont.render = function(onlyX1, onlyX2, onlyY, ...)
AMNT_OF_BLITS = 1 + AMNT_OF_BLITS
end
end
if windont.useSetVisible and bT.setVisible then
bT.setVisible(true)
end
end
windont.info.LAST_RENDER_AMOUNT = #windows