- updated to use the new rune graphics

- frost and unholy are in their old locations still in this module...we'll see if Blizzard leaves their rune swap hack in before changing it
This commit is contained in:
Parnic
2008-08-09 21:06:43 +00:00
parent 49169156b2
commit ab0ad63a14

View File

@ -12,9 +12,9 @@ local RUNETYPE_CHROMATIC = 4;
-- setup the names to be more easily readable -- setup the names to be more easily readable
Runes.prototype.runeNames = { Runes.prototype.runeNames = {
[RUNETYPE_BLOOD] = "Blood", [RUNETYPE_BLOOD] = "Blood",
[RUNETYPE_DEATH] = "Death", [RUNETYPE_DEATH] = "Unholy",
[RUNETYPE_FROST] = "Frost", [RUNETYPE_FROST] = "Frost",
[RUNETYPE_CHROMATIC] = "Chromatic", [RUNETYPE_CHROMATIC] = "Death",
} }
Runes.prototype.runeSize = 25 Runes.prototype.runeSize = 25
@ -26,7 +26,7 @@ function Runes.prototype:init()
Runes.super.prototype.init(self, "Runes") Runes.super.prototype.init(self, "Runes")
self:SetDefaultColor("Runes"..self.runeNames[RUNETYPE_BLOOD], 255, 0, 0) self:SetDefaultColor("Runes"..self.runeNames[RUNETYPE_BLOOD], 255, 0, 0)
self:SetDefaultColor("Runes"..self.runeNames[RUNETYPE_DEATH], 229, 119, 229) self:SetDefaultColor("Runes"..self.runeNames[RUNETYPE_DEATH], 0, 229, 0)
self:SetDefaultColor("Runes"..self.runeNames[RUNETYPE_FROST], 88, 195, 239) self:SetDefaultColor("Runes"..self.runeNames[RUNETYPE_FROST], 88, 195, 239)
-- todo: i guess i should figure out the chromatic rune's default color...set to white for now -- todo: i guess i should figure out the chromatic rune's default color...set to white for now
self:SetDefaultColor("Runes"..self.runeNames[RUNETYPE_CHROMATIC], 255, 255, 255) self:SetDefaultColor("Runes"..self.runeNames[RUNETYPE_CHROMATIC], 255, 255, 255)
@ -184,19 +184,15 @@ function Runes.prototype:UpdateRuneType(rune)
local thisRuneName = self.runeNames[GetRuneType(rune)] local thisRuneName = self.runeNames[GetRuneType(rune)]
self.frame.graphicalBG[rune]:SetStatusBarTexture(self:GetRuneTexture(thisRuneName, true)) self.frame.graphicalBG[rune]:SetStatusBarTexture(self:GetRuneTexture(thisRuneName))
self.frame.graphicalBG[rune]:SetStatusBarColor(self:GetColor("Runes"..thisRuneName)) self.frame.graphicalBG[rune]:SetStatusBarColor(self:GetColor("Runes"..thisRuneName))
self.frame.graphical[rune]:SetStatusBarTexture(self:GetRuneTexture(thisRuneName)) self.frame.graphical[rune]:SetStatusBarTexture(self:GetRuneTexture(thisRuneName))
self.frame.graphical[rune]:SetStatusBarColor(self:GetColor("Runes"..thisRuneName)) self.frame.graphical[rune]:SetStatusBarColor(self:GetColor("Runes"..thisRuneName))
end end
function Runes.prototype:GetRuneTexture(runeName, bg) function Runes.prototype:GetRuneTexture(runeName)
if bg then return "Interface\\PlayerFrame\\UI-PlayerFrame-DeathKnight-"..runeName
return "Interface\\PlayerFrame\\UI-PlayerFrame-DeathKnight-"..runeName.."-Off.tga"
else
return "Interface\\PlayerFrame\\UI-PlayerFrame-DeathKnight-"..runeName.."-On.tga"
end
end end
-- 'Protected' methods -------------------------------------------------------- -- 'Protected' methods --------------------------------------------------------
@ -243,7 +239,7 @@ function Runes.prototype:CreateRune(i, type, name)
if (not self.frame.graphicalBG[i]) then if (not self.frame.graphicalBG[i]) then
self.frame.graphicalBG[i] = CreateFrame("StatusBar", nil, self.frame) self.frame.graphicalBG[i] = CreateFrame("StatusBar", nil, self.frame)
self.frame.graphicalBG[i]:SetStatusBarTexture(self:GetRuneTexture(name, true)) self.frame.graphicalBG[i]:SetStatusBarTexture(self:GetRuneTexture(name))
end end
self.frame.graphicalBG[i]:SetFrameStrata("BACKGROUND") self.frame.graphicalBG[i]:SetFrameStrata("BACKGROUND")