fix(CountersSelectors): createWriteWithColor
This commit is contained in:
parent
5501e06844
commit
ab17e80fa5
@ -6,6 +6,8 @@ end
|
|||||||
|
|
||||||
local function createWriteWithColor(textColor, backgroundColor, givenWin)
|
local function createWriteWithColor(textColor, backgroundColor, givenWin)
|
||||||
local win = givenWin or term
|
local win = givenWin or term
|
||||||
|
|
||||||
|
return function(str)
|
||||||
local originalTextColor = nil
|
local originalTextColor = nil
|
||||||
local originalBackgroundColor = nil
|
local originalBackgroundColor = nil
|
||||||
|
|
||||||
@ -19,7 +21,6 @@ local function createWriteWithColor(textColor, backgroundColor, givenWin)
|
|||||||
win.setBackgroundColor(backgroundColor)
|
win.setBackgroundColor(backgroundColor)
|
||||||
end
|
end
|
||||||
|
|
||||||
return function(str)
|
|
||||||
win.write(str)
|
win.write(str)
|
||||||
|
|
||||||
if originalTextColor then
|
if originalTextColor then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user