mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 22:51:53 -05:00
Added missing library, bugfixes
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
## Name: IceHUD
|
## Name: IceHUD
|
||||||
## Title: IceHUD |cff7fff7f -Ace2-|r
|
## Title: IceHUD |cff7fff7f -Ace2-|r
|
||||||
## Notes: Another HUD mod
|
## Notes: Another HUD mod
|
||||||
## Version: 0.6.4 ($Revision$)
|
## Version: 0.6.5 ($Revision$)
|
||||||
## SavedVariables: IceCoreDB
|
## SavedVariables: IceCoreDB
|
||||||
## OptionalDeps: Ace2, DewdropLib, FuBar_ToFu, DruidBar, SoleManax, MobHealth, SpellStatusLib
|
## OptionalDeps: Ace2, DewdropLib, FuBar_ToFu, DruidBar, SoleManax, MobHealth, SpellStatusLib
|
||||||
## X-Category: UnitFrame
|
## X-Category: UnitFrame
|
||||||
@ -25,6 +25,7 @@ libs\Metrognome-2.0\Metrognome-2.0.lua
|
|||||||
libs\Dewdrop-2.0\Dewdrop-2.0.lua
|
libs\Dewdrop-2.0\Dewdrop-2.0.lua
|
||||||
libs\Deformat-2.0\Deformat-2.0.lua
|
libs\Deformat-2.0\Deformat-2.0.lua
|
||||||
libs\Gratuity-2.0\Gratuity-2.0.lua
|
libs\Gratuity-2.0\Gratuity-2.0.lua
|
||||||
|
libs\Babble-Spell-2.0\Babble-Spell-2.0.lua
|
||||||
libs\SpellCache-1.0\SpellCache-1.0.lua
|
libs\SpellCache-1.0\SpellCache-1.0.lua
|
||||||
libs\SpellStatus-1.0\SpellStatus-1.0.lua
|
libs\SpellStatus-1.0\SpellStatus-1.0.lua
|
||||||
libs\SpellStatus-AimedShot-1.0\SpellStatus-AimedShot-1.0.lua
|
libs\SpellStatus-AimedShot-1.0\SpellStatus-AimedShot-1.0.lua
|
||||||
|
@ -65,15 +65,16 @@ function CastBar.prototype:GetOptions()
|
|||||||
|
|
||||||
opts["flashFailures"] =
|
opts["flashFailures"] =
|
||||||
{
|
{
|
||||||
type = "toggle",
|
type = "text",
|
||||||
name = "Flash on Spell Failures",
|
name = "Flash on Spell Failures",
|
||||||
desc = "Toggles flashing of cast bar when a spell that was not being currently casts fails",
|
desc = "Defines when cast bar should flash on failed spells",
|
||||||
get = function()
|
get = function()
|
||||||
return self.moduleSettings.flashFailures
|
return self.moduleSettings.flashFailures
|
||||||
end,
|
end,
|
||||||
set = function(value)
|
set = function(value)
|
||||||
self.moduleSettings.flashFailures = value
|
self.moduleSettings.flashFailures = value
|
||||||
end,
|
end,
|
||||||
|
validate = { "Always", "Caster", "Never" },
|
||||||
order = 41
|
order = 41
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,6 +161,10 @@ function CastBar.prototype:OnUpdate()
|
|||||||
remainingTime = 0
|
remainingTime = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- sanity check to make sure the bar doesn't over/underfill
|
||||||
|
scale = scale > 1 and 1 or scale
|
||||||
|
scale = scale < 0 and 0 or scale
|
||||||
|
|
||||||
self:UpdateBar(scale, "castCasting")
|
self:UpdateBar(scale, "castCasting")
|
||||||
self:SetBottomText1(string.format("%.1fs %s%s", remainingTime , spellName, spellRankShort))
|
self:SetBottomText1(string.format("%.1fs %s%s", remainingTime , spellName, spellRankShort))
|
||||||
|
|
||||||
@ -303,10 +308,16 @@ function CastBar.prototype:SpellStatus_SpellCastFailure(sId, sName, sRank, sFull
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- do not show failure if user has that option disabled
|
|
||||||
if (not isActiveSpell and not self.moduleSettings.flashFailures) then
|
-- determine if we want to show failed casts
|
||||||
|
if (self.moduleSettings.flashFailures == "Never") then
|
||||||
|
return
|
||||||
|
elseif (isActiveSpell and self.moduleSettings.flashFailures == "Caster") then
|
||||||
|
if (UnitPowerType("player") ~= 0) then -- 0 == mana user
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
self:StartBar(CastBar.Actions.Fail, UIEM_Message)
|
self:StartBar(CastBar.Actions.Fail, UIEM_Message)
|
||||||
end
|
end
|
||||||
|
@ -23,6 +23,7 @@ function DruidMana.prototype:GetDefaultSettings()
|
|||||||
local settings = DruidMana.super.prototype.GetDefaultSettings(self)
|
local settings = DruidMana.super.prototype.GetDefaultSettings(self)
|
||||||
settings["side"] = IceCore.Side.Right
|
settings["side"] = IceCore.Side.Right
|
||||||
settings["offset"] = 0
|
settings["offset"] = 0
|
||||||
|
settings["textVisible"] = {upper = true, lower = false}
|
||||||
return settings
|
return settings
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -99,6 +100,7 @@ function DruidMana.prototype:Update()
|
|||||||
|
|
||||||
local percentage = (self.druidMana / self.druidMaxMana) * 100
|
local percentage = (self.druidMana / self.druidMaxMana) * 100
|
||||||
self:SetBottomText1(math.floor(percentage))
|
self:SetBottomText1(math.floor(percentage))
|
||||||
|
self:SetBottomText2(self:GetFormattedText(string.format("%.0f", self.druidMana), string.format("%.0f", self.druidMaxMana)), color)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -139,6 +139,23 @@ function TargetInfo.prototype:GetOptions()
|
|||||||
order = 34
|
order = 34
|
||||||
}
|
}
|
||||||
|
|
||||||
|
opts["mouse"] = {
|
||||||
|
type = 'toggle',
|
||||||
|
name = 'Mouseover',
|
||||||
|
desc = 'Toggle mouseover on/off',
|
||||||
|
get = function()
|
||||||
|
return self.moduleSettings.mouse
|
||||||
|
end,
|
||||||
|
set = function(v)
|
||||||
|
self.moduleSettings.mouse = v
|
||||||
|
self:Redraw()
|
||||||
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
|
order = 35
|
||||||
|
}
|
||||||
|
|
||||||
return opts
|
return opts
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -150,6 +167,7 @@ function TargetInfo.prototype:GetDefaultSettings()
|
|||||||
defaults["vpos"] = -50
|
defaults["vpos"] = -50
|
||||||
defaults["zoom"] = 0.2
|
defaults["zoom"] = 0.2
|
||||||
defaults["buffSize"] = 13
|
defaults["buffSize"] = 13
|
||||||
|
defaults["mouse"] = true
|
||||||
return defaults
|
return defaults
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -200,10 +218,20 @@ function TargetInfo.prototype:CreateTextFrame()
|
|||||||
end
|
end
|
||||||
|
|
||||||
self.frame.target.unit = target -- for blizz default tooltip handling
|
self.frame.target.unit = target -- for blizz default tooltip handling
|
||||||
|
|
||||||
|
if (self.moduleSettings.mouse) then
|
||||||
|
self.frame.target:EnableMouse(true)
|
||||||
self.frame.target:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
self.frame.target:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
||||||
self.frame.target:SetScript("OnClick", function() self:OnClick(arg1) end)
|
self.frame.target:SetScript("OnClick", function() self:OnClick(arg1) end)
|
||||||
self.frame.target:SetScript("OnEnter", function() UnitFrame_OnEnter() end)
|
self.frame.target:SetScript("OnEnter", function() UnitFrame_OnEnter() end)
|
||||||
self.frame.target:SetScript("OnLeave", function() UnitFrame_OnLeave() end)
|
self.frame.target:SetScript("OnLeave", function() UnitFrame_OnLeave() end)
|
||||||
|
else
|
||||||
|
self.frame.target:EnableMouse(false)
|
||||||
|
self.frame.target:RegisterForClicks()
|
||||||
|
self.frame.target:SetScript("OnClick", nil)
|
||||||
|
self.frame.target:SetScript("OnEnter", nil)
|
||||||
|
self.frame.target:SetScript("OnLeave", nil)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
self.frame.target:SetWidth(self.width)
|
self.frame.target:SetWidth(self.width)
|
||||||
@ -352,10 +380,16 @@ function TargetInfo.prototype:CreateIconFrames(parent, direction, buffs, type)
|
|||||||
buffs[i].icon.stack:SetPoint("BOTTOMRIGHT" , buffs[i].icon, "BOTTOMRIGHT", 1, -1)
|
buffs[i].icon.stack:SetPoint("BOTTOMRIGHT" , buffs[i].icon, "BOTTOMRIGHT", 1, -1)
|
||||||
end
|
end
|
||||||
|
|
||||||
buffs[i]:EnableMouse(true)
|
|
||||||
buffs[i].id = i
|
buffs[i].id = i
|
||||||
|
if (self.moduleSettings.mouse) then
|
||||||
|
buffs[i]:EnableMouse(true)
|
||||||
buffs[i]:SetScript("OnEnter", function() self:BuffOnEnter(type) end)
|
buffs[i]:SetScript("OnEnter", function() self:BuffOnEnter(type) end)
|
||||||
buffs[i]:SetScript("OnLeave", function() GameTooltip:Hide() end)
|
buffs[i]:SetScript("OnLeave", function() GameTooltip:Hide() end)
|
||||||
|
else
|
||||||
|
buffs[i]:EnableMouse(false)
|
||||||
|
buffs[i]:SetScript("OnEnter", nil)
|
||||||
|
buffs[i]:SetScript("OnLeave", nil)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return buffs
|
return buffs
|
||||||
|
@ -86,6 +86,23 @@ function TargetOfTarget.prototype:GetOptions()
|
|||||||
order = 33
|
order = 33
|
||||||
}
|
}
|
||||||
|
|
||||||
|
opts["mouse"] = {
|
||||||
|
type = 'toggle',
|
||||||
|
name = 'Mouseover',
|
||||||
|
desc = 'Toggle mouseover on/off',
|
||||||
|
get = function()
|
||||||
|
return self.moduleSettings.mouse
|
||||||
|
end,
|
||||||
|
set = function(v)
|
||||||
|
self.moduleSettings.mouse = v
|
||||||
|
self:Redraw()
|
||||||
|
end,
|
||||||
|
disabled = function()
|
||||||
|
return not self.moduleSettings.enabled
|
||||||
|
end,
|
||||||
|
order = 34
|
||||||
|
}
|
||||||
|
|
||||||
return opts
|
return opts
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -96,6 +113,7 @@ function TargetOfTarget.prototype:GetDefaultSettings()
|
|||||||
defaults["vpos"] = -50
|
defaults["vpos"] = -50
|
||||||
defaults["showDebuffs"] = true
|
defaults["showDebuffs"] = true
|
||||||
defaults["fontSize"] = 13
|
defaults["fontSize"] = 13
|
||||||
|
defaults["mouse"] = true
|
||||||
return defaults
|
return defaults
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -115,7 +133,7 @@ function TargetOfTarget.prototype:Enable(core)
|
|||||||
|
|
||||||
self:RegisterEvent("PLAYER_TARGET_CHANGED", "Update")
|
self:RegisterEvent("PLAYER_TARGET_CHANGED", "Update")
|
||||||
|
|
||||||
self:RegisterMetro(self.name, self.Update, 0.33, self)
|
self:RegisterMetro(self.name, self.Update, 0.2, self)
|
||||||
self:StartMetro(self.name)
|
self:StartMetro(self.name)
|
||||||
|
|
||||||
self:Update()
|
self:Update()
|
||||||
@ -149,11 +167,22 @@ function TargetOfTarget.prototype:CreateFrame()
|
|||||||
self.frame.texture:SetAllPoints(self.frame)
|
self.frame.texture:SetAllPoints(self.frame)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
self.frame.unit = self.unit -- for blizz default tooltip handling
|
self.frame.unit = self.unit -- for blizz default tooltip handling
|
||||||
|
|
||||||
|
if (self.moduleSettings.mouse) then
|
||||||
|
self.frame:EnableMouse(true)
|
||||||
self.frame:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
self.frame:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
||||||
self.frame:SetScript("OnClick", function() self:OnClick(arg1) end)
|
self.frame:SetScript("OnClick", function() self:OnClick(arg1) end)
|
||||||
self.frame:SetScript("OnEnter", function() UnitFrame_OnEnter() end)
|
self.frame:SetScript("OnEnter", function() UnitFrame_OnEnter() end)
|
||||||
self.frame:SetScript("OnLeave", function() UnitFrame_OnLeave() end)
|
self.frame:SetScript("OnLeave", function() UnitFrame_OnLeave() end)
|
||||||
|
else
|
||||||
|
self.frame:EnableMouse(false)
|
||||||
|
self.frame:RegisterForClicks()
|
||||||
|
self.frame:SetScript("OnClick", nil)
|
||||||
|
self.frame:SetScript("OnEnter", nil)
|
||||||
|
self.frame:SetScript("OnLeave", nil)
|
||||||
|
end
|
||||||
|
|
||||||
self:CreateBarFrame()
|
self:CreateBarFrame()
|
||||||
self:CreateToTFrame()
|
self:CreateToTFrame()
|
||||||
|
Reference in New Issue
Block a user