This commit is contained in:
Robert Jelic
2022-07-18 16:45:59 +02:00
parent 8157c025ea
commit 9d10e95fae
10 changed files with 468 additions and 178 deletions

View File

@@ -182,14 +182,14 @@ return function(name)
end
end
if(duration~=nil)and(#t>0)then
self:changeFG(duration, timer or 0, table.unpack(t))
self:changeTextColor(duration, timer or 0, table.unpack(t))
end
end
if(data["backgroundColor"]~=nil)then
local duration = xmlValue("duration", data["backgroundColor"])
local timer = xmlValue("time", data["backgroundColor"])
if(data["background"]~=nil)then
local duration = xmlValue("duration", data["background"])
local timer = xmlValue("time", data["background"])
local t = {}
local tab = data["backgroundColor"]["color"]
local tab = data["background"]["color"]
if(tab~=nil)then
if(tab.properties~=nil)then tab = {tab} end
for k,v in pairs(tab)do
@@ -197,7 +197,7 @@ return function(name)
end
end
if(duration~=nil)and(#t>0)then
self:changeBG(duration, timer or 0, table.unpack(t))
self:changeBackground(duration, timer or 0, table.unpack(t))
end
end
if(data["text"]~=nil)then
@@ -285,7 +285,7 @@ return function(name)
return self
end,
changeBG = function(self, duration, timer, ...)
changeBackground = function(self, duration, timer, ...)
local colors = {...}
timer = timer or 0
_OBJ = obj or _OBJ
@@ -297,7 +297,7 @@ return function(name)
return self
end,
changeFG = function(self, duration, timer, ...)
changeTextColor = function(self, duration, timer, ...)
local colors = {...}
timer = timer or 0
_OBJ = obj or _OBJ

View File

@@ -18,9 +18,8 @@ return function(name)
end;
setValuesByXMLData = function(self, data)
local f
if(xmlValue("time", data)~=nil)then timer = xmlValue("time", data) end
if(xmlValue("repeat", data)~=nil)then timer = xmlValue("repeat", data) end
if(xmlValue("repeat", data)~=nil)then savedRepeats = xmlValue("repeat", data) end
if(xmlValue("start", data)~=nil)then if(xmlValue("start", data))then self:start() end end
if(xmlValue("onCall", data)~=nil)then self:onCall(getBaseFrame():getVariable(xmlValue("onCall", data))) end
return self