From 5ee2bd5392c72a1b9615982cd749a7fe910b9303 Mon Sep 17 00:00:00 2001 From: Parnic Date: Sat, 27 Sep 2008 16:36:54 +0000 Subject: [PATCH] - added support for new combo point, sunder/lacerate count textures - added a new round combo point texture (user-submitted) - fixed a bug in the slice and dice module that caused it to stay visible for much longer than it should have under certain circumstances --- modules/ComboPoints.lua | 33 +++++++++++++++++++++++++++------ modules/LacerateCount.lua | 31 +++++++++++++++++++++++++++---- modules/SliceAndDice.lua | 15 +++++++++++++-- modules/SunderCount.lua | 31 +++++++++++++++++++++++++++---- textures/ComboRound.blp | Bin 0 -> 2564 bytes textures/ComboRoundBG.blp | Bin 0 -> 2564 bytes 6 files changed, 94 insertions(+), 16 deletions(-) create mode 100644 textures/ComboRound.blp create mode 100644 textures/ComboRoundBG.blp diff --git a/modules/ComboPoints.lua b/modules/ComboPoints.lua index 354ef62..070d433 100644 --- a/modules/ComboPoints.lua +++ b/modules/ComboPoints.lua @@ -70,9 +70,10 @@ function ComboPoints.prototype:GetOptions() end, set = function(v) self.moduleSettings.comboMode = v + self:CreateComboFrame(true) self:Redraw() end, - validate = { "Numeric", "Graphical" }, + validate = { "Numeric", "Graphical Bar", "Graphical Circle" }, disabled = function() return not self.moduleSettings.enabled end, @@ -131,6 +132,12 @@ function ComboPoints.prototype:Enable(core) else self:RegisterEvent("PLAYER_COMBO_POINTS", "UpdateComboPoints") end + + if self.moduleSettings.comboMode == "Graphical" then + self.moduleSettings.comboMode = "Graphical Bar" + end + + self:CreateComboFrame(true) end @@ -154,7 +161,7 @@ end -function ComboPoints.prototype:CreateComboFrame() +function ComboPoints.prototype:CreateComboFrame(forceTextureUpdate) -- create numeric combo points self.frame.numeric = self:FontFactory(self.moduleSettings.comboFontSize, nil, self.frame.numeric) @@ -174,8 +181,16 @@ function ComboPoints.prototype:CreateComboFrame() for i = 1, 5 do if (not self.frame.graphicalBG[i]) then self.frame.graphicalBG[i] = CreateFrame("StatusBar", nil, self.frame) - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboBG") end + + if forceTextureUpdate then + if self.moduleSettings.comboMode == "Graphical Bar" then + self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboBG") + elseif self.moduleSettings.comboMode == "Graphical Circle" then + self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboRoundBG") + end + end + self.frame.graphicalBG[i]:SetFrameStrata("BACKGROUND") self.frame.graphicalBG[i]:SetWidth(self.comboSize) self.frame.graphicalBG[i]:SetHeight(self.comboSize) @@ -190,8 +205,16 @@ function ComboPoints.prototype:CreateComboFrame() for i = 1, 5 do if (not self.frame.graphical[i]) then self.frame.graphical[i] = CreateFrame("StatusBar", nil, self.frame) - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "Combo") end + + if forceTextureUpdate then + if self.moduleSettings.comboMode == "Graphical Bar" then + self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "Combo") + elseif self.moduleSettings.comboMode == "Graphical Circle" then + self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboRound") + end + end + self.frame.graphical[i]:SetFrameStrata("BACKGROUND") self.frame.graphical[i]:SetAllPoints(self.frame.graphicalBG[i]) @@ -205,8 +228,6 @@ function ComboPoints.prototype:CreateComboFrame() end end - - function ComboPoints.prototype:UpdateComboPoints() local points if IceHUD.WowVer >= 30000 then diff --git a/modules/LacerateCount.lua b/modules/LacerateCount.lua index 6708e49..0ac48a2 100644 --- a/modules/LacerateCount.lua +++ b/modules/LacerateCount.lua @@ -71,9 +71,10 @@ function LacerateCount.prototype:GetOptions() end, set = function(v) self.moduleSettings.lacerateMode = v + self:CreateLacerateFrame(true) self:Redraw() end, - validate = { "Numeric", "Graphical" }, + validate = { "Numeric", "Graphical Bar", "Graphical Circle" }, disabled = function() return not self.moduleSettings.enabled end, @@ -128,6 +129,12 @@ function LacerateCount.prototype:Enable(core) self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateLacerateCount") self:RegisterEvent("UNIT_AURA", "UpdateLacerateCount") + + if self.moduleSettings.lacerateMode == "Graphical" then + self.moduleSettings.lacerateMode = "Graphical Bar" + end + + self:CreateLacerateFrame(true) end @@ -151,7 +158,7 @@ end -function LacerateCount.prototype:CreateLacerateFrame() +function LacerateCount.prototype:CreateLacerateFrame(doTextureUpdate) -- create numeric lacerates self.frame.numeric = self:FontFactory(self.moduleSettings.lacerateFontSize, nil, self.frame.numeric) @@ -171,8 +178,16 @@ function LacerateCount.prototype:CreateLacerateFrame() for i = 1, 5 do if (not self.frame.graphicalBG[i]) then self.frame.graphicalBG[i] = CreateFrame("StatusBar", nil, self.frame) - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboBG") end + + if doTextureUpdate then + if self.moduleSettings.lacerateMode == "Graphical Bar" then + self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboBG") + elseif self.moduleSettings.lacerateMode == "Graphical Circle" then + self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboRoundBG") + end + end + self.frame.graphicalBG[i]:SetFrameStrata("BACKGROUND") self.frame.graphicalBG[i]:SetWidth(self.lacerateSize) self.frame.graphicalBG[i]:SetHeight(self.lacerateSize) @@ -187,8 +202,16 @@ function LacerateCount.prototype:CreateLacerateFrame() for i = 1, 5 do if (not self.frame.graphical[i]) then self.frame.graphical[i] = CreateFrame("StatusBar", nil, self.frame) - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "Combo") end + + if doTextureUpdate then + if self.moduleSettings.lacerateMode == "Graphical Bar" then + self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "Combo") + elseif self.moduleSettings.lacerateMode == "Graphical Circle" then + self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboRound") + end + end + self.frame.graphical[i]:SetFrameStrata("BACKGROUND") self.frame.graphical[i]:SetAllPoints(self.frame.graphicalBG[i]) diff --git a/modules/SliceAndDice.lua b/modules/SliceAndDice.lua index 0c683b2..ffa32ef 100644 --- a/modules/SliceAndDice.lua +++ b/modules/SliceAndDice.lua @@ -37,7 +37,7 @@ end function SliceAndDice.prototype:Enable(core) SliceAndDice.super.prototype.Enable(self, core) - self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateDurationBar") + self:RegisterEvent("PLAYER_TARGET_CHANGED", "TargetChanged") if IceHUD.WowVer >= 30000 then self:RegisterEvent("UNIT_AURA", "UpdateSliceAndDice") self:RegisterEvent("UNIT_COMBO_POINTS", "UpdateDurationBar") @@ -51,6 +51,11 @@ function SliceAndDice.prototype:Enable(core) self:SetBottomText1("") end +function SliceAndDice.prototype:TargetChanged() + self:UpdateDurationBar() + self:UpdateSliceAndDice() +end + function SliceAndDice.prototype:Disable(core) SliceAndDice.super.prototype.Disable(self, core) @@ -226,7 +231,7 @@ function SliceAndDice.prototype:UpdateSliceAndDice(unit, fromUpdate) else self:UpdateBar(0, "SliceAndDice") - if ((IceHUD.WowVer >= 30000 and GetComboPoints(self.unit, "target") == 0) or (IceHUD.WowVer < 30000 and GetComboPoints("target") == 0)) or not UnitExists("target") then + if ((IceHUD.WowVer >= 30000 and GetComboPoints(self.unit, "target") == 0) or (IceHUD.WowVer < 30000 and GetComboPoints() == 0)) or not UnitExists("target") then if self.bIsVisible then self.frame:SetScript("OnUpdate", nil) end @@ -350,6 +355,12 @@ function SliceAndDice.prototype:IsItemIdInList(itemId, list) return false end +function SliceAndDice.prototype:OutCombat() + SliceAndDice.super.prototype.OutCombat(self) + + self:UpdateSliceAndDice() +end + local _, unitClass = UnitClass("player") -- Load us up if unitClass == "ROGUE" then diff --git a/modules/SunderCount.lua b/modules/SunderCount.lua index 03d2ca8..b3a19d8 100644 --- a/modules/SunderCount.lua +++ b/modules/SunderCount.lua @@ -71,9 +71,10 @@ function SunderCount.prototype:GetOptions() end, set = function(v) self.moduleSettings.sunderMode = v + self:CreateSunderFrame(true) self:Redraw() end, - validate = { "Numeric", "Graphical" }, + validate = { "Numeric", "Graphical Bar", "Graphical Circle" }, disabled = function() return not self.moduleSettings.enabled end, @@ -128,6 +129,12 @@ function SunderCount.prototype:Enable(core) self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateSunderCount") self:RegisterEvent("UNIT_AURA", "UpdateSunderCount") + + if self.moduleSettings.sunderMode == "Graphical" then + self.moduleSettings.sunderMode = "Graphical Bar" + end + + self:CreateSunderFrame(true) end @@ -151,7 +158,7 @@ end -function SunderCount.prototype:CreateSunderFrame() +function SunderCount.prototype:CreateSunderFrame(doTextureUpdate) -- create numeric sunders self.frame.numeric = self:FontFactory(self.moduleSettings.sunderFontSize, nil, self.frame.numeric) @@ -171,8 +178,16 @@ function SunderCount.prototype:CreateSunderFrame() for i = 1, 5 do if (not self.frame.graphicalBG[i]) then self.frame.graphicalBG[i] = CreateFrame("StatusBar", nil, self.frame) - self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboBG") end + + if doTextureUpdate then + if self.moduleSettings.sunderMode == "Graphical Bar" then + self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboBG") + elseif self.moduleSettings.sunderMode == "Graphical Circle" then + self.frame.graphicalBG[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboRoundBG") + end + end + self.frame.graphicalBG[i]:SetFrameStrata("BACKGROUND") self.frame.graphicalBG[i]:SetWidth(self.sunderSize) self.frame.graphicalBG[i]:SetHeight(self.sunderSize) @@ -187,8 +202,16 @@ function SunderCount.prototype:CreateSunderFrame() for i = 1, 5 do if (not self.frame.graphical[i]) then self.frame.graphical[i] = CreateFrame("StatusBar", nil, self.frame) - self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "Combo") end + + if doTextureUpdate then + if self.moduleSettings.sunderMode == "Graphical Bar" then + self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "Combo") + elseif self.moduleSettings.sunderMode == "Graphical Circle" then + self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "ComboRound") + end + end + self.frame.graphical[i]:SetFrameStrata("BACKGROUND") self.frame.graphical[i]:SetAllPoints(self.frame.graphicalBG[i]) diff --git a/textures/ComboRound.blp b/textures/ComboRound.blp new file mode 100644 index 0000000000000000000000000000000000000000..c1bc2d2c6c5d40eb8c88e67c168cb194ef8dbc9b GIT binary patch literal 2564 zcmeHJO=uHQ5T4x_Xs{)F2?i?Yr65AdA`PTa*x=d27F{iLX#yTR8VD7^L-){QDbmJs zP6ZKKsIXoeDD;?I^d#gYcyuMEY02W}O!mhVjLA(8nJ{_p+c)p~=FPkfx&Oetrx1}k zqbRp|6t7)lpJ7iCePsW_{)2sDMIN*v=jqg@6_{3FT7iiw09+0G$5@Z`HO<|J z51`*B=VIgG3!V;)@lVTomLI|=mZi|Tf@QP@@oLTuPL-gTFFfW*e5zfVIA+p9(`l5~ zezO;vZ{NX+@aJ}+Nq@n8UcbxhD^ypI#JupSiPS<=x#n9kE-sXN{LV~;v1{~Kg2(k{@?t{so0Xv69x4U zzX{Xh^Mx~=JnGOn@WCagQIzV4_1lcEydMFcC9au#BtCIHNj>V)cX|!HuN8|$C)f=v z9ek61$Nh~l?>(Vgynl5kJ(rTdQv-|g@%jG91F8Sxij0^K@NV_fBK@f!I)Q&~kUb;v zOrjfvS)>D;%T%C&{D99h%fu^ba8rff$RwHCYk6oGg6WQ*jq(_bmc{vty2SGr<6p;{ BMFao< literal 0 HcmV?d00001 diff --git a/textures/ComboRoundBG.blp b/textures/ComboRoundBG.blp new file mode 100644 index 0000000000000000000000000000000000000000..b674604ece61f6bda9d2585b05b3f3a12d2883e2 GIT binary patch literal 2564 zcmeHIu}UjJ6g?BNV8CLVl_yx(iC`gOX|X6gEK&?OWAzG~bScC-cK(23Y2gR>5z)j5 z;gs(aUjG{VynAPMVxmZ*JkTO{xy+oMJNL{zGqbzjv^xesZONE*Y1Oam;!ENU;J5f6 z@n`Y5P3A+AmeS-CF5QJK6j&&*P+%?vMx*JlFUISm(fMEbs#)au#TkcGY`ymfEe6w3 zwd37sY;b6}!8?u5BtAyf5c8QVVhB#X*pBg4{#5cZ@Hyvw%uXi0kK#>q4C`D~{-Q|h zd7r<>J|8*wG~b)`?Xk&UY^U|7s>k(KFA^RId!N1k$KMwACimv$zhue$30JC@_s+ek zr+Sg{%^Y84y<;}R{(D~(v+55&WeHM#TLMF#F~2|_*W+#EJ7`VwAMcLw9XAe*srYrD}wqqOIj`fz-0V`mG r%Q_!fQJgR*hB2RW7F?D`lIVC5j#Kxh%iFCG@0?5f8d~}OyvF|kxYNdB literal 0 HcmV?d00001