mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40: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,
|
end,
|
||||||
set = function(v)
|
set = function(v)
|
||||||
self.moduleSettings.comboMode = v
|
self.moduleSettings.comboMode = v
|
||||||
|
self:CreateComboFrame(true)
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
end,
|
end,
|
||||||
validate = { "Numeric", "Graphical" },
|
validate = { "Numeric", "Graphical Bar", "Graphical Circle" },
|
||||||
disabled = function()
|
disabled = function()
|
||||||
return not self.moduleSettings.enabled
|
return not self.moduleSettings.enabled
|
||||||
end,
|
end,
|
||||||
@ -131,6 +132,12 @@ function ComboPoints.prototype:Enable(core)
|
|||||||
else
|
else
|
||||||
self:RegisterEvent("PLAYER_COMBO_POINTS", "UpdateComboPoints")
|
self:RegisterEvent("PLAYER_COMBO_POINTS", "UpdateComboPoints")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self.moduleSettings.comboMode == "Graphical" then
|
||||||
|
self.moduleSettings.comboMode = "Graphical Bar"
|
||||||
|
end
|
||||||
|
|
||||||
|
self:CreateComboFrame(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -154,7 +161,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function ComboPoints.prototype:CreateComboFrame()
|
function ComboPoints.prototype:CreateComboFrame(forceTextureUpdate)
|
||||||
|
|
||||||
-- create numeric combo points
|
-- create numeric combo points
|
||||||
self.frame.numeric = self:FontFactory(self.moduleSettings.comboFontSize, nil, self.frame.numeric)
|
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
|
for i = 1, 5 do
|
||||||
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(IceElement.TexturePath .. "ComboBG")
|
|
||||||
end
|
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]:SetFrameStrata("BACKGROUND")
|
||||||
self.frame.graphicalBG[i]:SetWidth(self.comboSize)
|
self.frame.graphicalBG[i]:SetWidth(self.comboSize)
|
||||||
self.frame.graphicalBG[i]:SetHeight(self.comboSize)
|
self.frame.graphicalBG[i]:SetHeight(self.comboSize)
|
||||||
@ -190,8 +205,16 @@ function ComboPoints.prototype:CreateComboFrame()
|
|||||||
for i = 1, 5 do
|
for i = 1, 5 do
|
||||||
if (not self.frame.graphical[i]) then
|
if (not self.frame.graphical[i]) then
|
||||||
self.frame.graphical[i] = CreateFrame("StatusBar", nil, self.frame)
|
self.frame.graphical[i] = CreateFrame("StatusBar", nil, self.frame)
|
||||||
self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "Combo")
|
|
||||||
end
|
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]:SetFrameStrata("BACKGROUND")
|
||||||
self.frame.graphical[i]:SetAllPoints(self.frame.graphicalBG[i])
|
self.frame.graphical[i]:SetAllPoints(self.frame.graphicalBG[i])
|
||||||
|
|
||||||
@ -205,8 +228,6 @@ function ComboPoints.prototype:CreateComboFrame()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function ComboPoints.prototype:UpdateComboPoints()
|
function ComboPoints.prototype:UpdateComboPoints()
|
||||||
local points
|
local points
|
||||||
if IceHUD.WowVer >= 30000 then
|
if IceHUD.WowVer >= 30000 then
|
||||||
|
@ -71,9 +71,10 @@ function LacerateCount.prototype:GetOptions()
|
|||||||
end,
|
end,
|
||||||
set = function(v)
|
set = function(v)
|
||||||
self.moduleSettings.lacerateMode = v
|
self.moduleSettings.lacerateMode = v
|
||||||
|
self:CreateLacerateFrame(true)
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
end,
|
end,
|
||||||
validate = { "Numeric", "Graphical" },
|
validate = { "Numeric", "Graphical Bar", "Graphical Circle" },
|
||||||
disabled = function()
|
disabled = function()
|
||||||
return not self.moduleSettings.enabled
|
return not self.moduleSettings.enabled
|
||||||
end,
|
end,
|
||||||
@ -128,6 +129,12 @@ function LacerateCount.prototype:Enable(core)
|
|||||||
|
|
||||||
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateLacerateCount")
|
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateLacerateCount")
|
||||||
self:RegisterEvent("UNIT_AURA", "UpdateLacerateCount")
|
self:RegisterEvent("UNIT_AURA", "UpdateLacerateCount")
|
||||||
|
|
||||||
|
if self.moduleSettings.lacerateMode == "Graphical" then
|
||||||
|
self.moduleSettings.lacerateMode = "Graphical Bar"
|
||||||
|
end
|
||||||
|
|
||||||
|
self:CreateLacerateFrame(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -151,7 +158,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function LacerateCount.prototype:CreateLacerateFrame()
|
function LacerateCount.prototype:CreateLacerateFrame(doTextureUpdate)
|
||||||
|
|
||||||
-- create numeric lacerates
|
-- create numeric lacerates
|
||||||
self.frame.numeric = self:FontFactory(self.moduleSettings.lacerateFontSize, nil, self.frame.numeric)
|
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
|
for i = 1, 5 do
|
||||||
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(IceElement.TexturePath .. "ComboBG")
|
|
||||||
end
|
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]:SetFrameStrata("BACKGROUND")
|
||||||
self.frame.graphicalBG[i]:SetWidth(self.lacerateSize)
|
self.frame.graphicalBG[i]:SetWidth(self.lacerateSize)
|
||||||
self.frame.graphicalBG[i]:SetHeight(self.lacerateSize)
|
self.frame.graphicalBG[i]:SetHeight(self.lacerateSize)
|
||||||
@ -187,8 +202,16 @@ function LacerateCount.prototype:CreateLacerateFrame()
|
|||||||
for i = 1, 5 do
|
for i = 1, 5 do
|
||||||
if (not self.frame.graphical[i]) then
|
if (not self.frame.graphical[i]) then
|
||||||
self.frame.graphical[i] = CreateFrame("StatusBar", nil, self.frame)
|
self.frame.graphical[i] = CreateFrame("StatusBar", nil, self.frame)
|
||||||
self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "Combo")
|
|
||||||
end
|
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]:SetFrameStrata("BACKGROUND")
|
||||||
self.frame.graphical[i]:SetAllPoints(self.frame.graphicalBG[i])
|
self.frame.graphical[i]:SetAllPoints(self.frame.graphicalBG[i])
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ end
|
|||||||
function SliceAndDice.prototype:Enable(core)
|
function SliceAndDice.prototype:Enable(core)
|
||||||
SliceAndDice.super.prototype.Enable(self, core)
|
SliceAndDice.super.prototype.Enable(self, core)
|
||||||
|
|
||||||
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateDurationBar")
|
self:RegisterEvent("PLAYER_TARGET_CHANGED", "TargetChanged")
|
||||||
if IceHUD.WowVer >= 30000 then
|
if IceHUD.WowVer >= 30000 then
|
||||||
self:RegisterEvent("UNIT_AURA", "UpdateSliceAndDice")
|
self:RegisterEvent("UNIT_AURA", "UpdateSliceAndDice")
|
||||||
self:RegisterEvent("UNIT_COMBO_POINTS", "UpdateDurationBar")
|
self:RegisterEvent("UNIT_COMBO_POINTS", "UpdateDurationBar")
|
||||||
@ -51,6 +51,11 @@ function SliceAndDice.prototype:Enable(core)
|
|||||||
self:SetBottomText1("")
|
self:SetBottomText1("")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function SliceAndDice.prototype:TargetChanged()
|
||||||
|
self:UpdateDurationBar()
|
||||||
|
self:UpdateSliceAndDice()
|
||||||
|
end
|
||||||
|
|
||||||
function SliceAndDice.prototype:Disable(core)
|
function SliceAndDice.prototype:Disable(core)
|
||||||
SliceAndDice.super.prototype.Disable(self, core)
|
SliceAndDice.super.prototype.Disable(self, core)
|
||||||
|
|
||||||
@ -226,7 +231,7 @@ function SliceAndDice.prototype:UpdateSliceAndDice(unit, fromUpdate)
|
|||||||
else
|
else
|
||||||
self:UpdateBar(0, "SliceAndDice")
|
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
|
if self.bIsVisible then
|
||||||
self.frame:SetScript("OnUpdate", nil)
|
self.frame:SetScript("OnUpdate", nil)
|
||||||
end
|
end
|
||||||
@ -350,6 +355,12 @@ function SliceAndDice.prototype:IsItemIdInList(itemId, list)
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function SliceAndDice.prototype:OutCombat()
|
||||||
|
SliceAndDice.super.prototype.OutCombat(self)
|
||||||
|
|
||||||
|
self:UpdateSliceAndDice()
|
||||||
|
end
|
||||||
|
|
||||||
local _, unitClass = UnitClass("player")
|
local _, unitClass = UnitClass("player")
|
||||||
-- Load us up
|
-- Load us up
|
||||||
if unitClass == "ROGUE" then
|
if unitClass == "ROGUE" then
|
||||||
|
@ -71,9 +71,10 @@ function SunderCount.prototype:GetOptions()
|
|||||||
end,
|
end,
|
||||||
set = function(v)
|
set = function(v)
|
||||||
self.moduleSettings.sunderMode = v
|
self.moduleSettings.sunderMode = v
|
||||||
|
self:CreateSunderFrame(true)
|
||||||
self:Redraw()
|
self:Redraw()
|
||||||
end,
|
end,
|
||||||
validate = { "Numeric", "Graphical" },
|
validate = { "Numeric", "Graphical Bar", "Graphical Circle" },
|
||||||
disabled = function()
|
disabled = function()
|
||||||
return not self.moduleSettings.enabled
|
return not self.moduleSettings.enabled
|
||||||
end,
|
end,
|
||||||
@ -128,6 +129,12 @@ function SunderCount.prototype:Enable(core)
|
|||||||
|
|
||||||
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateSunderCount")
|
self:RegisterEvent("PLAYER_TARGET_CHANGED", "UpdateSunderCount")
|
||||||
self:RegisterEvent("UNIT_AURA", "UpdateSunderCount")
|
self:RegisterEvent("UNIT_AURA", "UpdateSunderCount")
|
||||||
|
|
||||||
|
if self.moduleSettings.sunderMode == "Graphical" then
|
||||||
|
self.moduleSettings.sunderMode = "Graphical Bar"
|
||||||
|
end
|
||||||
|
|
||||||
|
self:CreateSunderFrame(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -151,7 +158,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function SunderCount.prototype:CreateSunderFrame()
|
function SunderCount.prototype:CreateSunderFrame(doTextureUpdate)
|
||||||
|
|
||||||
-- create numeric sunders
|
-- create numeric sunders
|
||||||
self.frame.numeric = self:FontFactory(self.moduleSettings.sunderFontSize, nil, self.frame.numeric)
|
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
|
for i = 1, 5 do
|
||||||
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(IceElement.TexturePath .. "ComboBG")
|
|
||||||
end
|
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]:SetFrameStrata("BACKGROUND")
|
||||||
self.frame.graphicalBG[i]:SetWidth(self.sunderSize)
|
self.frame.graphicalBG[i]:SetWidth(self.sunderSize)
|
||||||
self.frame.graphicalBG[i]:SetHeight(self.sunderSize)
|
self.frame.graphicalBG[i]:SetHeight(self.sunderSize)
|
||||||
@ -187,8 +202,16 @@ function SunderCount.prototype:CreateSunderFrame()
|
|||||||
for i = 1, 5 do
|
for i = 1, 5 do
|
||||||
if (not self.frame.graphical[i]) then
|
if (not self.frame.graphical[i]) then
|
||||||
self.frame.graphical[i] = CreateFrame("StatusBar", nil, self.frame)
|
self.frame.graphical[i] = CreateFrame("StatusBar", nil, self.frame)
|
||||||
self.frame.graphical[i]:SetStatusBarTexture(IceElement.TexturePath .. "Combo")
|
|
||||||
end
|
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]:SetFrameStrata("BACKGROUND")
|
||||||
self.frame.graphical[i]:SetAllPoints(self.frame.graphicalBG[i])
|
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