mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
Combine rune texture/color set into one method
This enables a simpler method of making sure the appropriate texture is set and using the appropriate color (for after a rune was modified to darkened/hidden).
This commit is contained in:
@ -542,7 +542,7 @@ function IceClassPowerCounter.prototype:UpdateRunePower(event, arg1, arg2)
|
||||
for i=1, self.numRunes do
|
||||
if i <= self.round(percentReady) then
|
||||
if self:GetRuneMode() == "Graphical" then
|
||||
self.frame.graphical[i].rune:SetVertexColor(1, 1, 1)
|
||||
self:SetRuneGraphicalTexture(i)
|
||||
else
|
||||
self:SetCustomColor(i)
|
||||
end
|
||||
@ -826,12 +826,7 @@ function IceClassPowerCounter.prototype:SetupRuneTexture(rune)
|
||||
end
|
||||
|
||||
if self:GetRuneMode() == "Graphical" then
|
||||
local tex = self:GetRuneTexture(rune)
|
||||
if tex then
|
||||
self.frame.graphical[rune].rune:SetTexture(tex)
|
||||
else
|
||||
self.frame.graphical[rune].rune:SetAtlas(self:GetRuneAtlas(rune), self:UseAtlasSize(rune))
|
||||
end
|
||||
self:SetRuneGraphicalTexture(rune)
|
||||
elseif self:GetRuneMode() == "Graphical Bar" then
|
||||
self.frame.graphical[rune].rune:SetTexture(IceElement.TexturePath .. "Combo")
|
||||
elseif self:GetRuneMode() == "Graphical Circle" then
|
||||
@ -843,6 +838,17 @@ function IceClassPowerCounter.prototype:SetupRuneTexture(rune)
|
||||
end
|
||||
end
|
||||
|
||||
function IceClassPowerCounter.prototype:SetRuneGraphicalTexture(rune)
|
||||
self.frame.graphical[rune].rune:SetVertexColor(1, 1, 1)
|
||||
|
||||
local tex = self:GetRuneTexture(rune)
|
||||
if tex then
|
||||
self.frame.graphical[rune].rune:SetTexture(tex)
|
||||
else
|
||||
self.frame.graphical[rune].rune:SetAtlas(self:GetRuneAtlas(rune), self:UseAtlasSize(rune))
|
||||
end
|
||||
end
|
||||
|
||||
function IceClassPowerCounter.prototype:GetAlphaAdd()
|
||||
return 0.15
|
||||
end
|
||||
|
Reference in New Issue
Block a user