Commit b90dd7dd authored by Ivaria's avatar Ivaria
Browse files

Fixed bouquest validator icon opacity

parent 8a537602
......@@ -126,10 +126,19 @@ local VUHDO_getUnitHealthModiPercent = VUHDO_getUnitHealthModiPercent;
--
local tOpacity;
local function VUHDO_setStatusBarColor(aBar, aColor)
tOpacity = aColor["useOpacity"] and aColor["O"] or nil;
if aColor["useBackground"] then aBar:SetStatusBarColor(aColor["R"], aColor["G"], aColor["B"], tOpacity);
elseif tOpacity then aBar:SetAlpha(tOpacity); end
if aColor["useBackground"] then
if tOpacity then
aBar:SetStatusBarColor(aColor["R"], aColor["G"], aColor["B"], tOpacity);
else
aBar:SetStatusBarColor(aColor["R"], aColor["G"], aColor["B"]);
end
elseif tOpacity then
aBar:SetAlpha(tOpacity);
end
end
......@@ -140,8 +149,12 @@ local function VUHDO_setTextureColor(aTexture, aColor)
tOpacity = aColor["useOpacity"] and aColor["O"] or nil;
if aColor["useBackground"] then
aTexture:SetVertexColor(aColor["R"], aColor["G"], aColor["B"], tOpacity);
if aColor["useBackground"] then
if tOpacity then
aTexture:SetVertexColor(aColor["R"], aColor["G"], aColor["B"], tOpacity);
else
aTexture:SetVertexColor(aColor["R"], aColor["G"], aColor["B"]);
end
elseif tOpacity then
aTexture:SetAlpha(tOpacity);
end
......
......@@ -322,6 +322,11 @@ local function VUHDO_customizeHotIcons(aButton, aHotName, aRest, aTimes, anIcon,
tHotColor = VUHDO_copyColor(tHotCfg);
if sIsHotShowIcon then
tHotColor["R"], tHotColor["G"], tHotColor["B"] = 1, 1, 1;
if aColor and aColor["useOpacity"] and aColor["O"] then
tHotColor["useOpacity"] = true;
tHotColor["O"] = aColor["O"];
end
elseif aTimes <= 1 or not sHotCols["useColorText"] then
tTimer:SetTextColor(VUHDO_textColor(tHotColor));
end
......@@ -341,7 +346,7 @@ local function VUHDO_customizeHotIcons(aButton, aHotName, aRest, aTimes, anIcon,
end
end
if tIsChargeAlpha then
if (tIsChargeAlpha or tHotColor["useOpacity"]) and tHotColor["O"] then
tIcon:SetVertexColor(tHotColor["R"], tHotColor["G"], tHotColor["B"], tHotColor["O"]);
else
tIcon:SetVertexColor(tHotColor["R"], tHotColor["G"], tHotColor["B"]);
......
......@@ -206,7 +206,6 @@ local tTimer;
local tCounter;
local tDuration;
local tBuffInfo;
local tColor;
local tTimer2
local tClipL, tClipR, tClipT, tClipB;
local tType;
......@@ -279,10 +278,18 @@ local function VUHDO_evaluateBouquet(aUnit, aBouquetName, anInfo)
if tIsActive then
tIcon, tTimer, tCounter, tDuration = tBuffInfo[3], tBuffInfo[tInfos["alive"] and 5 or 1], tBuffInfo[2], tBuffInfo[4];
if tTimer then tTimer = floor(tTimer * 10) * 0.1; end
if tTimer then
tTimer = floor(tTimer * 10) * 0.1;
end
tColor = tInfos["color"];
if tInfos["icon"] ~= 1 then tIcon = VUHDO_CUSTOM_ICONS[tInfos["icon"]][2];
else tColor["isDefault"] = true; end
if tInfos["icon"] ~= 1 then
tIcon = VUHDO_CUSTOM_ICONS[tInfos["icon"]][2];
tColor["isDefault"] = false;
else
tColor["isDefault"] = true;
end
end
tTimer2, tClipL, tClipR, tClipT, tClipB = nil, nil, nil, nil, nil;
end
......
......@@ -14,6 +14,7 @@ Known issues:
Bugfixes:
-- Fixed latency when changing the player focus unit
-- Fixed bouquest validator icon opacity
Improvements:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment