mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-15 22:30:13 -05:00
- 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
This commit is contained in:
@ -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
|
||||
|
@ -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])
|
||||
|
||||
|
@ -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
|
||||
|
@ -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])
|
||||
|
||||
|
BIN
textures/ComboRound.blp
Normal file
BIN
textures/ComboRound.blp
Normal file
Binary file not shown.
BIN
textures/ComboRoundBG.blp
Normal file
BIN
textures/ComboRoundBG.blp
Normal file
Binary file not shown.
Reference in New Issue
Block a user