mirror of
https://github.com/parnic/ice-hud.git
synced 2025-06-16 06:40:13 -05:00
- made all buffs/debuffs display on the info modules when in configuration mode
- compressed buffs/debuffs on the info modules so that they will not make room for a large buff if the previous row never had a large buff on it. this fixes every row being separated by enough vertical space to make room for the larger of "buff size" and "own buff size" settings
This commit is contained in:
@ -1030,6 +1030,8 @@ end
|
||||
function IceTargetInfo.prototype:CreateIconFrames(parent, direction, buffs, type, skipSize)
|
||||
local lastX = 0
|
||||
local lastBuffSize = 0
|
||||
local lastY = 0
|
||||
local largestHeightThisRow = 0
|
||||
|
||||
if not self.MyOnEnterBuffFunc then
|
||||
self.MyOnEnterBuffFunc = function(this) self:BuffOnEnter(this) end
|
||||
@ -1075,16 +1077,24 @@ function IceTargetInfo.prototype:CreateIconFrames(parent, direction, buffs, type
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local buffSize = self.moduleSettings.auras["buff"].size
|
||||
if buffs[i].fromPlayer then
|
||||
buffSize = self.moduleSettings.auras["buff"].ownSize
|
||||
end
|
||||
|
||||
local pos = i % self.moduleSettings.perRow
|
||||
if pos == 1 or self.moduleSettings.perRow == 1 then
|
||||
lastX = 0
|
||||
lastBuffSize = 0
|
||||
lastY = lastY + largestHeightThisRow
|
||||
largestHeightThisRow = 0
|
||||
end
|
||||
|
||||
local buffSize = self.moduleSettings.auras["buff"].size
|
||||
if buffSize > largestHeightThisRow then
|
||||
largestHeightThisRow = buffSize
|
||||
end
|
||||
if buffs[i].fromPlayer then
|
||||
buffSize = self.moduleSettings.auras["buff"].ownSize
|
||||
|
||||
if buffSize > largestHeightThisRow then
|
||||
largestHeightThisRow = buffSize
|
||||
end
|
||||
end
|
||||
|
||||
local spaceOffset = ((pos == 1 or self.moduleSettings.perRow == 1) and 0 or self.moduleSettings.spaceBetweenBuffs)
|
||||
@ -1095,7 +1105,7 @@ function IceTargetInfo.prototype:CreateIconFrames(parent, direction, buffs, type
|
||||
local x = lastX + lastBuffSize + spaceOffset
|
||||
lastX = x
|
||||
lastBuffSize = (buffSize * direction)
|
||||
local y = math.floor((i-1) / self.moduleSettings.perRow) * math.max(self.moduleSettings.auras["buff"].size, self.moduleSettings.auras["buff"].ownSize) * -1
|
||||
local y = lastY * -1
|
||||
|
||||
buffs[i]:ClearAllPoints()
|
||||
if direction < 0 then
|
||||
@ -1165,7 +1175,14 @@ function IceTargetInfo.prototype:UpdateBuffType(aura)
|
||||
local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable = UnitAura(self.unit, i, reaction .. (filter and "|PLAYER" or ""))
|
||||
local isFromMe = (unitCaster == "player")
|
||||
|
||||
if (icon) then
|
||||
if not icon and IceHUD.IceCore:IsInConfigMode() and UnitExists(self.unit) then
|
||||
icon = [[Interface\Icons\Spell_Frost_Frost]]
|
||||
duration = 60
|
||||
expirationTime = GetTime() + 59
|
||||
count = 1
|
||||
end
|
||||
|
||||
if icon then
|
||||
self:SetupAura(aura, i, icon, duration, expirationTime, isFromMe, count, isStealable)
|
||||
else
|
||||
self.frame[auraFrame].buffs[i]:Hide()
|
||||
|
Reference in New Issue
Block a user