mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 14:50:13 -05:00
- made sure to set the custom bar's buff icon to draw on top of the bar
- fixed the custom bar to call up to the super's version of TargetChanged so that the internal "i has a target" property is kept updated - made custom bar weapon buffs display an appropriate icon
This commit is contained in:
@ -30,7 +30,7 @@ function IceCustomBar.prototype:Enable(core)
|
|||||||
self.unit = self.moduleSettings.myUnit
|
self.unit = self.moduleSettings.myUnit
|
||||||
|
|
||||||
self:UpdateCustomBar(self.unit)
|
self:UpdateCustomBar(self.unit)
|
||||||
|
|
||||||
if self.moduleSettings.auraIconXOffset == nil then
|
if self.moduleSettings.auraIconXOffset == nil then
|
||||||
self.moduleSettings.auraIconXOffset = 40
|
self.moduleSettings.auraIconXOffset = 40
|
||||||
end
|
end
|
||||||
@ -40,6 +40,8 @@ function IceCustomBar.prototype:Enable(core)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function IceCustomBar.prototype:TargetChanged()
|
function IceCustomBar.prototype:TargetChanged()
|
||||||
|
IceCustomBar.super.prototype.TargetChanged(self)
|
||||||
|
|
||||||
self:UpdateCustomBar(self.unit)
|
self:UpdateCustomBar(self.unit)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -83,7 +85,7 @@ end
|
|||||||
|
|
||||||
function IceCustomBar.prototype:CreateBar()
|
function IceCustomBar.prototype:CreateBar()
|
||||||
IceCustomBar.super.prototype.CreateBar(self)
|
IceCustomBar.super.prototype.CreateBar(self)
|
||||||
|
|
||||||
if not self.barFrame.icon then
|
if not self.barFrame.icon then
|
||||||
self.barFrame.icon = self.barFrame:CreateTexture(nil, "LOW")
|
self.barFrame.icon = self.barFrame:CreateTexture(nil, "LOW")
|
||||||
-- default texture so that 'config mode' can work without activating the bar first
|
-- default texture so that 'config mode' can work without activating the bar first
|
||||||
@ -92,6 +94,7 @@ function IceCustomBar.prototype:CreateBar()
|
|||||||
self.barFrame.icon:SetHeight(20)
|
self.barFrame.icon:SetHeight(20)
|
||||||
-- this cuts off the border around the buff icon
|
-- this cuts off the border around the buff icon
|
||||||
self.barFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
|
self.barFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9)
|
||||||
|
self.barFrame.icon:SetDrawLayer("OVERLAY")
|
||||||
end
|
end
|
||||||
self:PositionIcons()
|
self:PositionIcons()
|
||||||
end
|
end
|
||||||
@ -107,7 +110,7 @@ end
|
|||||||
|
|
||||||
function IceCustomBar.prototype:Redraw()
|
function IceCustomBar.prototype:Redraw()
|
||||||
IceCustomBar.super.prototype.Redraw(self)
|
IceCustomBar.super.prototype.Redraw(self)
|
||||||
|
|
||||||
self:UpdateCustomBar(self.unit)
|
self:UpdateCustomBar(self.unit)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -398,12 +401,14 @@ function IceCustomBar.prototype:GetAuraDuration(unitName, buffName)
|
|||||||
= GetWeaponEnchantInfo()
|
= GetWeaponEnchantInfo()
|
||||||
|
|
||||||
if unitName == "main hand weapon" and hasMainHandEnchant then
|
if unitName == "main hand weapon" and hasMainHandEnchant then
|
||||||
return mainHandExpiration/1000, mainHandExpiration/1000, mainHandCharges
|
local slotId, mainHandTexture = GetInventorySlotInfo("MainHandSlot")
|
||||||
|
return mainHandExpiration/1000, mainHandExpiration/1000, mainHandCharges, GetInventoryItemTexture("player", slotId)
|
||||||
elseif unitName == "off hand weapon" and hasOffHandEnchant then
|
elseif unitName == "off hand weapon" and hasOffHandEnchant then
|
||||||
return offHandExpiration/1000, offHandExpiration/1000, offHandCharges
|
local slotId, offHandTexture = GetInventorySlotInfo("SecondaryHandSlot")
|
||||||
|
return offHandExpiration/1000, offHandExpiration/1000, offHandCharges, GetInventoryItemTexture("player", slotId)
|
||||||
end
|
end
|
||||||
|
|
||||||
return nil, nil, nil
|
return nil, nil, nil, nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local i = 1
|
local i = 1
|
||||||
|
Reference in New Issue
Block a user