initial commit
This commit is contained in:
208
Modules/UnitFrames/Groups/Arena.lua
Normal file
208
Modules/UnitFrames/Groups/Arena.lua
Normal file
@@ -0,0 +1,208 @@
|
||||
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule('UnitFrames')
|
||||
|
||||
local _, ns = ...
|
||||
local ElvUF = ns.oUF
|
||||
assert(ElvUF, 'ElvUI was unable to locate oUF.')
|
||||
|
||||
local _G = _G
|
||||
local unpack = unpack
|
||||
local CreateFrame = CreateFrame
|
||||
local IsAddOnLoaded = IsAddOnLoaded
|
||||
local GetSpecializationInfoByID = GetSpecializationInfoByID
|
||||
local LOCALIZED_CLASS_NAMES_MALE = LOCALIZED_CLASS_NAMES_MALE
|
||||
|
||||
local ArenaHeader = CreateFrame('Frame', 'ArenaHeader', E.UIParent)
|
||||
|
||||
function UF:ToggleArenaPreparationInfo(frame, show, specName, specTexture, specClass)
|
||||
if not (frame and frame.ArenaPrepSpec and frame.ArenaPrepIcon) then return end
|
||||
|
||||
local specIcon = (frame.db and frame.db.pvpSpecIcon) and frame:IsElementEnabled('PVPSpecIcon')
|
||||
|
||||
frame.forceInRange = show -- used to force unitframe range
|
||||
|
||||
if show then -- during `PostUpdateArenaPreparation` this means spec class and name exist
|
||||
frame.ArenaPrepSpec:SetText(specName..' - '..LOCALIZED_CLASS_NAMES_MALE[specClass])
|
||||
frame.Health.value:Hide()
|
||||
|
||||
if specIcon then
|
||||
frame.ArenaPrepIcon:SetTexture(specTexture or [[INTERFACE\ICONS\INV_MISC_QUESTIONMARK]])
|
||||
frame.ArenaPrepIcon.bg:Show()
|
||||
frame.ArenaPrepIcon:Show()
|
||||
frame.PVPSpecIcon:Hide()
|
||||
end
|
||||
else -- mainly called from `PostUpdateArenaFrame` to hide them
|
||||
frame.ArenaPrepSpec:SetText('')
|
||||
frame.Health.value:Show()
|
||||
|
||||
if specIcon then
|
||||
frame.ArenaPrepIcon.bg:Hide()
|
||||
frame.ArenaPrepIcon:Hide()
|
||||
frame.PVPSpecIcon:Show()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function UF:PostUpdateArenaFrame(event)
|
||||
if self and event and (event ~= 'ARENA_PREP_OPPONENT_SPECIALIZATIONS' and event ~= 'PLAYER_ENTERING_WORLD') then
|
||||
UF:ToggleArenaPreparationInfo(self)
|
||||
end
|
||||
end
|
||||
|
||||
function UF:PostUpdateArenaPreparation(_, specID)
|
||||
local _, specName, specTexture, specClass
|
||||
if specID and specID > 0 then
|
||||
_, specName, _, specTexture, _, specClass = GetSpecializationInfoByID(specID)
|
||||
end
|
||||
|
||||
UF:ToggleArenaPreparationInfo(self and self.__owner, specClass and specName, specName, specTexture, specClass)
|
||||
end
|
||||
|
||||
function UF:Construct_ArenaFrames(frame)
|
||||
frame.RaisedElementParent = CreateFrame('Frame', nil, frame)
|
||||
frame.RaisedElementParent.TextureParent = CreateFrame('Frame', nil, frame.RaisedElementParent)
|
||||
frame.RaisedElementParent:SetFrameLevel(frame:GetFrameLevel() + 100)
|
||||
|
||||
frame.Health = UF:Construct_HealthBar(frame, true, true, 'RIGHT')
|
||||
frame.Name = UF:Construct_NameText(frame)
|
||||
|
||||
if not frame.isChild then
|
||||
frame.Power = UF:Construct_PowerBar(frame, true, true, 'LEFT')
|
||||
frame.PowerPrediction = UF:Construct_PowerPrediction(frame)
|
||||
|
||||
frame.Portrait3D = UF:Construct_Portrait(frame, 'model')
|
||||
frame.Portrait2D = UF:Construct_Portrait(frame, 'texture')
|
||||
|
||||
frame.Buffs = UF:Construct_Buffs(frame)
|
||||
frame.Debuffs = UF:Construct_Debuffs(frame)
|
||||
frame.Castbar = UF:Construct_Castbar(frame)
|
||||
frame.HealthPrediction = UF:Construct_HealComm(frame)
|
||||
frame.MouseGlow = UF:Construct_MouseGlow(frame)
|
||||
frame.TargetGlow = UF:Construct_TargetGlow(frame)
|
||||
frame.FocusGlow = UF:Construct_FocusGlow(frame)
|
||||
frame.Trinket = UF:Construct_Trinket(frame)
|
||||
frame.PVPSpecIcon = UF:Construct_PVPSpecIcon(frame)
|
||||
frame.PvPClassificationIndicator = UF:Construct_PvPClassificationIndicator(frame) -- Cart / Flag / Orb / Assassin Bounty
|
||||
frame.Fader = UF:Construct_Fader()
|
||||
frame:SetAttribute('type2', 'focus')
|
||||
|
||||
frame.customTexts = {}
|
||||
frame.InfoPanel = UF:Construct_InfoPanel(frame)
|
||||
frame.unitframeType = 'arena'
|
||||
|
||||
-- Arena Preparation
|
||||
frame.ArenaPrepIcon = frame:CreateTexture(nil, 'OVERLAY')
|
||||
frame.ArenaPrepIcon.bg = CreateFrame('Frame', nil, frame, 'BackdropTemplate')
|
||||
frame.ArenaPrepIcon.bg:SetAllPoints(frame.PVPSpecIcon.bg)
|
||||
frame.ArenaPrepIcon.bg:SetTemplate()
|
||||
frame.ArenaPrepIcon:SetParent(frame.ArenaPrepIcon.bg)
|
||||
frame.ArenaPrepIcon:SetTexCoord(unpack(E.TexCoords))
|
||||
frame.ArenaPrepIcon:SetInside(frame.ArenaPrepIcon.bg)
|
||||
frame.ArenaPrepIcon.bg:Hide()
|
||||
frame.ArenaPrepIcon:Hide()
|
||||
|
||||
frame.ArenaPrepSpec = frame.Health:CreateFontString(nil, 'OVERLAY')
|
||||
frame.ArenaPrepSpec:Point('CENTER')
|
||||
UF:Configure_FontString(frame.ArenaPrepSpec)
|
||||
|
||||
frame.Health.PostUpdateArenaPreparation = self.PostUpdateArenaPreparation -- used to update arena prep info
|
||||
frame.PostUpdate = self.PostUpdateArenaFrame -- used to hide arena prep info
|
||||
end
|
||||
|
||||
frame.Cutaway = UF:Construct_Cutaway(frame)
|
||||
|
||||
ArenaHeader:Point('BOTTOMRIGHT', E.UIParent, 'RIGHT', -105, -165)
|
||||
E:CreateMover(ArenaHeader, ArenaHeader:GetName()..'Mover', L["Arena Frames"], nil, nil, nil, 'ALL,ARENA', nil, 'unitframe,groupUnits,arena,generalGroup')
|
||||
frame.mover = ArenaHeader.mover
|
||||
end
|
||||
|
||||
function UF:Update_ArenaFrames(frame, db)
|
||||
frame.db = db
|
||||
|
||||
do
|
||||
frame.ORIENTATION = db.orientation --allow this value to change when unitframes position changes on screen?
|
||||
frame.UNIT_WIDTH = db.width
|
||||
frame.UNIT_HEIGHT = db.infoPanel.enable and (db.height + db.infoPanel.height) or db.height
|
||||
frame.USE_POWERBAR = db.power.enable
|
||||
frame.POWERBAR_DETACHED = db.power.detachFromFrame
|
||||
frame.USE_INSET_POWERBAR = not frame.POWERBAR_DETACHED and db.power.width == 'inset' and frame.USE_POWERBAR
|
||||
frame.USE_MINI_POWERBAR = (not frame.POWERBAR_DETACHED and db.power.width == 'spaced' and frame.USE_POWERBAR)
|
||||
frame.USE_POWERBAR_OFFSET = (db.power.width == 'offset' and db.power.offset ~= 0) and frame.USE_POWERBAR and not frame.POWERBAR_DETACHED
|
||||
frame.POWERBAR_OFFSET = frame.USE_POWERBAR_OFFSET and db.power.offset or 0
|
||||
frame.POWERBAR_HEIGHT = not frame.USE_POWERBAR and 0 or db.power.height
|
||||
frame.POWERBAR_WIDTH = frame.USE_MINI_POWERBAR and (frame.UNIT_WIDTH - (UF.BORDER*2))/2 or (frame.POWERBAR_DETACHED and db.power.detachedWidth or (frame.UNIT_WIDTH - ((UF.BORDER+UF.SPACING)*2)))
|
||||
frame.USE_PORTRAIT = db.portrait and db.portrait.enable
|
||||
frame.USE_PORTRAIT_OVERLAY = frame.USE_PORTRAIT
|
||||
frame.PORTRAIT_WIDTH = (frame.USE_PORTRAIT_OVERLAY or not frame.USE_PORTRAIT) and 0 or db.portrait.width
|
||||
frame.CLASSBAR_YOFFSET = 0
|
||||
frame.USE_INFO_PANEL = not frame.USE_MINI_POWERBAR and not frame.USE_POWERBAR_OFFSET and db.infoPanel.enable
|
||||
frame.INFO_PANEL_HEIGHT = frame.USE_INFO_PANEL and db.infoPanel.height or 0
|
||||
frame.BOTTOM_OFFSET = UF:GetHealthBottomOffset(frame)
|
||||
frame.PVPINFO_WIDTH = db.pvpSpecIcon and frame.UNIT_HEIGHT or 0
|
||||
end
|
||||
|
||||
if not IsAddOnLoaded('Clique') then
|
||||
if db.middleClickFocus then
|
||||
frame:SetAttribute('type3', 'focus')
|
||||
elseif frame:GetAttribute('type3') == 'focus' then
|
||||
frame:SetAttribute('type3', nil)
|
||||
end
|
||||
end
|
||||
|
||||
frame.colors = ElvUF.colors
|
||||
frame:RegisterForClicks(self.db.targetOnMouseDown and 'AnyDown' or 'AnyUp')
|
||||
frame:Size(frame.UNIT_WIDTH, frame.UNIT_HEIGHT)
|
||||
|
||||
UF:Configure_InfoPanel(frame)
|
||||
UF:Configure_HealthBar(frame)
|
||||
UF:UpdateNameSettings(frame)
|
||||
UF:Configure_Power(frame)
|
||||
UF:Configure_PowerPrediction(frame)
|
||||
UF:Configure_Portrait(frame)
|
||||
UF:EnableDisable_Auras(frame)
|
||||
UF:Configure_AllAuras(frame)
|
||||
UF:Configure_Castbar(frame)
|
||||
UF:Configure_PVPSpecIcon(frame)
|
||||
UF:Configure_Trinket(frame)
|
||||
UF:Configure_Fader(frame)
|
||||
UF:Configure_HealComm(frame)
|
||||
UF:Configure_Cutaway(frame)
|
||||
UF:Configure_CustomTexts(frame)
|
||||
UF:Configure_PvPClassificationIndicator(frame)
|
||||
|
||||
frame:ClearAllPoints()
|
||||
if frame.index == 1 then
|
||||
local ArenaHeaderMover = _G.ArenaHeaderMover
|
||||
if db.growthDirection == 'UP' then
|
||||
frame:Point('BOTTOMRIGHT', ArenaHeaderMover, 'BOTTOMRIGHT')
|
||||
elseif db.growthDirection == 'RIGHT' then
|
||||
frame:Point('LEFT', ArenaHeaderMover, 'LEFT')
|
||||
elseif db.growthDirection == 'LEFT' then
|
||||
frame:Point('RIGHT', ArenaHeaderMover, 'RIGHT')
|
||||
else --Down
|
||||
frame:Point('TOPRIGHT', ArenaHeaderMover, 'TOPRIGHT')
|
||||
end
|
||||
else
|
||||
if db.growthDirection == 'UP' then
|
||||
frame:Point('BOTTOMRIGHT', _G['ElvUF_Arena'..frame.index-1], 'TOPRIGHT', 0, db.spacing)
|
||||
elseif db.growthDirection == 'RIGHT' then
|
||||
frame:Point('LEFT', _G['ElvUF_Arena'..frame.index-1], 'RIGHT', db.spacing, 0)
|
||||
elseif db.growthDirection == 'LEFT' then
|
||||
frame:Point('RIGHT', _G['ElvUF_Arena'..frame.index-1], 'LEFT', -db.spacing, 0)
|
||||
else --Down
|
||||
frame:Point('TOPRIGHT', _G['ElvUF_Arena'..frame.index-1], 'BOTTOMRIGHT', 0, -db.spacing)
|
||||
end
|
||||
end
|
||||
|
||||
if db.growthDirection == 'UP' or db.growthDirection == 'DOWN' then
|
||||
ArenaHeader:Width(frame.UNIT_WIDTH)
|
||||
ArenaHeader:Height(frame.UNIT_HEIGHT + ((frame.UNIT_HEIGHT + db.spacing) * 4))
|
||||
elseif db.growthDirection == 'LEFT' or db.growthDirection == 'RIGHT' then
|
||||
ArenaHeader:Width(frame.UNIT_WIDTH + ((frame.UNIT_WIDTH + db.spacing) * 4))
|
||||
ArenaHeader:Height(frame.UNIT_HEIGHT)
|
||||
end
|
||||
|
||||
frame:UpdateAllElements('ElvUI_UpdateAllElements')
|
||||
end
|
||||
|
||||
UF.unitgroupstoload.arena = {5, 'ELVUI_UNITTARGET'}
|
||||
150
Modules/UnitFrames/Groups/Assist.lua
Normal file
150
Modules/UnitFrames/Groups/Assist.lua
Normal file
@@ -0,0 +1,150 @@
|
||||
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule('UnitFrames')
|
||||
|
||||
local _, ns = ...
|
||||
local ElvUF = ns.oUF
|
||||
assert(ElvUF, 'ElvUI was unable to locate oUF.')
|
||||
|
||||
local _G = _G
|
||||
local max = max
|
||||
local CreateFrame = CreateFrame
|
||||
local IsAddOnLoaded = IsAddOnLoaded
|
||||
local InCombatLockdown = InCombatLockdown
|
||||
local RegisterAttributeDriver = RegisterAttributeDriver
|
||||
|
||||
function UF:Construct_AssistFrames()
|
||||
self:SetScript('OnEnter', _G.UnitFrame_OnEnter)
|
||||
self:SetScript('OnLeave', _G.UnitFrame_OnLeave)
|
||||
|
||||
self.RaisedElementParent = CreateFrame('Frame', nil, self)
|
||||
self.RaisedElementParent.TextureParent = CreateFrame('Frame', nil, self.RaisedElementParent)
|
||||
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
||||
|
||||
self.Health = UF:Construct_HealthBar(self, true)
|
||||
self.Name = UF:Construct_NameText(self)
|
||||
self.ThreatIndicator = UF:Construct_Threat(self)
|
||||
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||
self.FocusGlow = UF:Construct_FocusGlow(self)
|
||||
self.Fader = UF:Construct_Fader()
|
||||
self.Cutaway = UF:Construct_Cutaway(self)
|
||||
|
||||
if not self.isChild then
|
||||
self.Buffs = UF:Construct_Buffs(self)
|
||||
self.Debuffs = UF:Construct_Debuffs(self)
|
||||
self.AuraWatch = UF:Construct_AuraWatch(self)
|
||||
self.RaidDebuffs = UF:Construct_RaidDebuffs(self)
|
||||
self.AuraHighlight = UF:Construct_AuraHighlight(self)
|
||||
|
||||
self.unitframeType = 'assist'
|
||||
else
|
||||
self.unitframeType = 'assisttarget'
|
||||
end
|
||||
|
||||
self.originalParent = self:GetParent()
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function UF:Update_AssistHeader(header, db)
|
||||
header:Hide()
|
||||
header.db = db
|
||||
|
||||
UF:ClearChildPoints(header:GetChildren())
|
||||
|
||||
if not header.isForced and db.enable then
|
||||
RegisterAttributeDriver(header, 'state-visibility', '[@raid1,exists] show;hide')
|
||||
end
|
||||
|
||||
header:SetAttribute('point', 'BOTTOM')
|
||||
header:SetAttribute('columnAnchorPoint', 'LEFT')
|
||||
header:SetAttribute('yOffset', db.verticalSpacing)
|
||||
|
||||
if not header.positioned then
|
||||
header:ClearAllPoints()
|
||||
header:Point('TOPLEFT', E.UIParent, 'TOPLEFT', 4, -248)
|
||||
|
||||
local width, height = header:GetSize()
|
||||
local minHeight = max(height, 2 * db.height + db.verticalSpacing)
|
||||
header:SetAttribute('minHeight', minHeight)
|
||||
header:SetAttribute('minWidth', width)
|
||||
|
||||
E:CreateMover(header, header:GetName()..'Mover', L["MA Frames"], nil, nil, nil, 'ALL,RAID', nil, 'unitframe,groupUnits,assist,generalGroup')
|
||||
header.mover:SetSize(width, minHeight)
|
||||
|
||||
header.positioned = true
|
||||
end
|
||||
end
|
||||
|
||||
function UF:Update_AssistFrames(frame, db)
|
||||
frame.db = db
|
||||
frame.colors = ElvUF.colors
|
||||
frame:RegisterForClicks(UF.db.targetOnMouseDown and 'AnyDown' or 'AnyUp')
|
||||
|
||||
do
|
||||
frame.ORIENTATION = db.orientation --allow this value to change when unitframes position changes on screen?
|
||||
frame.SHADOW_SPACING = 3
|
||||
frame.UNIT_WIDTH = db.width
|
||||
frame.UNIT_HEIGHT = db.height
|
||||
frame.USE_POWERBAR = false
|
||||
frame.POWERBAR_DETACHED = false
|
||||
frame.USE_INSET_POWERBAR = false
|
||||
frame.USE_MINI_POWERBAR = false
|
||||
frame.USE_POWERBAR_OFFSET = false
|
||||
frame.POWERBAR_OFFSET = 0
|
||||
frame.POWERBAR_HEIGHT = 0
|
||||
frame.POWERBAR_WIDTH = 0
|
||||
frame.USE_PORTRAIT = false
|
||||
frame.USE_PORTRAIT_OVERLAY = false
|
||||
frame.PORTRAIT_WIDTH = 0
|
||||
frame.CLASSBAR_YOFFSET = 0
|
||||
frame.BOTTOM_OFFSET = 0
|
||||
end
|
||||
|
||||
if frame.isChild then
|
||||
local childDB = db.targetsGroup
|
||||
frame.db = db.targetsGroup
|
||||
|
||||
frame:Size(childDB.width, childDB.height)
|
||||
|
||||
if not InCombatLockdown() then
|
||||
if childDB.enable then
|
||||
frame:Enable()
|
||||
frame:ClearAllPoints()
|
||||
frame:Point(E.InversePoints[childDB.anchorPoint], frame.originalParent, childDB.anchorPoint, childDB.xOffset, childDB.yOffset)
|
||||
else
|
||||
frame:Disable()
|
||||
end
|
||||
end
|
||||
else
|
||||
frame:Size(frame.UNIT_WIDTH, frame.UNIT_HEIGHT)
|
||||
end
|
||||
|
||||
UF:Configure_HealthBar(frame)
|
||||
UF:Configure_Threat(frame)
|
||||
UF:UpdateNameSettings(frame)
|
||||
UF:Configure_Fader(frame)
|
||||
UF:Configure_RaidIcon(frame)
|
||||
UF:Configure_Cutaway(frame)
|
||||
|
||||
if not frame.isChild then
|
||||
if not IsAddOnLoaded('Clique') then
|
||||
if db.middleClickFocus then
|
||||
frame:SetAttribute('type3', 'focus')
|
||||
elseif frame:GetAttribute('type3') == 'focus' then
|
||||
frame:SetAttribute('type3', nil)
|
||||
end
|
||||
end
|
||||
|
||||
UF:EnableDisable_Auras(frame)
|
||||
UF:Configure_AllAuras(frame)
|
||||
UF:Configure_RaidDebuffs(frame)
|
||||
UF:Configure_AuraHighlight(frame)
|
||||
UF:Configure_AuraWatch(frame)
|
||||
end
|
||||
|
||||
frame:UpdateAllElements('ElvUI_UpdateAllElements')
|
||||
end
|
||||
|
||||
UF.headerstoload.assist = {'MAINASSIST', 'ELVUI_UNITTARGET'}
|
||||
131
Modules/UnitFrames/Groups/Boss.lua
Normal file
131
Modules/UnitFrames/Groups/Boss.lua
Normal file
@@ -0,0 +1,131 @@
|
||||
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule('UnitFrames')
|
||||
|
||||
local _, ns = ...
|
||||
local ElvUF = ns.oUF
|
||||
assert(ElvUF, 'ElvUI was unable to locate oUF.')
|
||||
|
||||
local _G = _G
|
||||
local CreateFrame = CreateFrame
|
||||
local IsAddOnLoaded = IsAddOnLoaded
|
||||
local MAX_BOSS_FRAMES = MAX_BOSS_FRAMES
|
||||
-- GLOBALS: BossHeaderMover
|
||||
|
||||
local BossHeader = CreateFrame('Frame', 'BossHeader', E.UIParent)
|
||||
function UF:Construct_BossFrames(frame)
|
||||
frame.RaisedElementParent = CreateFrame('Frame', nil, frame)
|
||||
frame.RaisedElementParent.TextureParent = CreateFrame('Frame', nil, frame.RaisedElementParent)
|
||||
frame.RaisedElementParent:SetFrameLevel(frame:GetFrameLevel() + 100)
|
||||
|
||||
frame.Health = UF:Construct_HealthBar(frame, true, true, 'RIGHT')
|
||||
frame.Power = UF:Construct_PowerBar(frame, true, true, 'LEFT')
|
||||
frame.Power.displayAltPower = true
|
||||
frame.PowerPrediction = UF:Construct_PowerPrediction(frame)
|
||||
frame.Name = UF:Construct_NameText(frame)
|
||||
frame.Portrait3D = UF:Construct_Portrait(frame, 'model')
|
||||
frame.Portrait2D = UF:Construct_Portrait(frame, 'texture')
|
||||
frame.InfoPanel = UF:Construct_InfoPanel(frame)
|
||||
frame.Buffs = UF:Construct_Buffs(frame)
|
||||
frame.Debuffs = UF:Construct_Debuffs(frame)
|
||||
frame.AuraHighlight = UF:Construct_AuraHighlight(frame)
|
||||
frame.Castbar = UF:Construct_Castbar(frame)
|
||||
frame.RaidTargetIndicator = UF:Construct_RaidIcon(frame)
|
||||
frame.Fader = UF:Construct_Fader()
|
||||
frame.Cutaway = UF:Construct_Cutaway(frame)
|
||||
frame.MouseGlow = UF:Construct_MouseGlow(frame)
|
||||
frame.TargetGlow = UF:Construct_TargetGlow(frame)
|
||||
frame.FocusGlow = UF:Construct_FocusGlow(frame)
|
||||
frame:SetAttribute('type2', 'focus')
|
||||
frame.customTexts = {}
|
||||
|
||||
BossHeader:Point('BOTTOMRIGHT', E.UIParent, 'RIGHT', -105, -165)
|
||||
E:CreateMover(BossHeader, BossHeader:GetName()..'Mover', L["Boss Frames"], nil, nil, nil, 'ALL,PARTY,RAID', nil, 'unitframe,groupUnits,boss,generalGroup')
|
||||
frame.mover = BossHeader.mover
|
||||
|
||||
frame.unitframeType = 'boss'
|
||||
end
|
||||
|
||||
function UF:Update_BossFrames(frame, db)
|
||||
frame.db = db
|
||||
|
||||
do
|
||||
frame.ORIENTATION = db.orientation --allow this value to change when unitframes position changes on screen?
|
||||
frame.UNIT_WIDTH = db.width
|
||||
frame.UNIT_HEIGHT = db.infoPanel.enable and (db.height + db.infoPanel.height) or db.height
|
||||
frame.USE_POWERBAR = db.power.enable
|
||||
frame.POWERBAR_DETACHED = db.power.detachFromFrame
|
||||
frame.USE_INSET_POWERBAR = not frame.POWERBAR_DETACHED and db.power.width == 'inset' and frame.USE_POWERBAR
|
||||
frame.USE_MINI_POWERBAR = (not frame.POWERBAR_DETACHED and db.power.width == 'spaced' and frame.USE_POWERBAR)
|
||||
frame.USE_POWERBAR_OFFSET = (db.power.width == 'offset' and db.power.offset ~= 0) and frame.USE_POWERBAR and not frame.POWERBAR_DETACHED
|
||||
frame.POWERBAR_OFFSET = frame.USE_POWERBAR_OFFSET and db.power.offset or 0
|
||||
frame.POWERBAR_HEIGHT = not frame.USE_POWERBAR and 0 or db.power.height
|
||||
frame.POWERBAR_WIDTH = frame.USE_MINI_POWERBAR and (frame.UNIT_WIDTH - (UF.BORDER*2))/2 or (frame.POWERBAR_DETACHED and db.power.detachedWidth or (frame.UNIT_WIDTH - ((UF.BORDER+UF.SPACING)*2)))
|
||||
frame.USE_PORTRAIT = db.portrait and db.portrait.enable
|
||||
frame.USE_PORTRAIT_OVERLAY = frame.USE_PORTRAIT and (db.portrait.overlay or frame.ORIENTATION == 'MIDDLE')
|
||||
frame.PORTRAIT_WIDTH = (frame.USE_PORTRAIT_OVERLAY or not frame.USE_PORTRAIT) and 0 or db.portrait.width
|
||||
frame.USE_INFO_PANEL = not frame.USE_MINI_POWERBAR and not frame.USE_POWERBAR_OFFSET and db.infoPanel.enable
|
||||
frame.INFO_PANEL_HEIGHT = frame.USE_INFO_PANEL and db.infoPanel.height or 0
|
||||
frame.BOTTOM_OFFSET = UF:GetHealthBottomOffset(frame)
|
||||
end
|
||||
|
||||
if not IsAddOnLoaded('Clique') then
|
||||
if db.middleClickFocus then
|
||||
frame:SetAttribute('type3', 'focus')
|
||||
elseif frame:GetAttribute('type3') == 'focus' then
|
||||
frame:SetAttribute('type3', nil)
|
||||
end
|
||||
end
|
||||
|
||||
frame.colors = ElvUF.colors
|
||||
frame:RegisterForClicks(self.db.targetOnMouseDown and 'AnyDown' or 'AnyUp')
|
||||
frame:Size(frame.UNIT_WIDTH, frame.UNIT_HEIGHT)
|
||||
UF:Configure_InfoPanel(frame)
|
||||
UF:Configure_HealthBar(frame)
|
||||
UF:UpdateNameSettings(frame)
|
||||
UF:Configure_Power(frame)
|
||||
UF:Configure_PowerPrediction(frame)
|
||||
UF:Configure_Portrait(frame)
|
||||
UF:EnableDisable_Auras(frame)
|
||||
UF:Configure_AllAuras(frame)
|
||||
UF:Configure_Castbar(frame)
|
||||
UF:Configure_RaidIcon(frame)
|
||||
UF:Configure_AuraHighlight(frame)
|
||||
UF:Configure_CustomTexts(frame)
|
||||
UF:Configure_Fader(frame)
|
||||
UF:Configure_Cutaway(frame)
|
||||
|
||||
frame:ClearAllPoints()
|
||||
if frame.index == 1 then
|
||||
if db.growthDirection == 'UP' then
|
||||
frame:Point('BOTTOMRIGHT', BossHeaderMover, 'BOTTOMRIGHT')
|
||||
elseif db.growthDirection == 'RIGHT' then
|
||||
frame:Point('LEFT', BossHeaderMover, 'LEFT')
|
||||
elseif db.growthDirection == 'LEFT' then
|
||||
frame:Point('RIGHT', BossHeaderMover, 'RIGHT')
|
||||
else --Down
|
||||
frame:Point('TOPRIGHT', BossHeaderMover, 'TOPRIGHT')
|
||||
end
|
||||
else
|
||||
if db.growthDirection == 'UP' then
|
||||
frame:Point('BOTTOMRIGHT', _G['ElvUF_Boss'..frame.index-1], 'TOPRIGHT', 0, db.spacing)
|
||||
elseif db.growthDirection == 'RIGHT' then
|
||||
frame:Point('LEFT', _G['ElvUF_Boss'..frame.index-1], 'RIGHT', db.spacing, 0)
|
||||
elseif db.growthDirection == 'LEFT' then
|
||||
frame:Point('RIGHT', _G['ElvUF_Boss'..frame.index-1], 'LEFT', -db.spacing, 0)
|
||||
else --Down
|
||||
frame:Point('TOPRIGHT', _G['ElvUF_Boss'..frame.index-1], 'BOTTOMRIGHT', 0, -db.spacing)
|
||||
end
|
||||
end
|
||||
|
||||
if db.growthDirection == 'UP' or db.growthDirection == 'DOWN' then
|
||||
BossHeader:Width(frame.UNIT_WIDTH)
|
||||
BossHeader:Height(frame.UNIT_HEIGHT + ((frame.UNIT_HEIGHT + db.spacing) * (MAX_BOSS_FRAMES -1)))
|
||||
elseif db.growthDirection == 'LEFT' or db.growthDirection == 'RIGHT' then
|
||||
BossHeader:Width(frame.UNIT_WIDTH + ((frame.UNIT_WIDTH + db.spacing) * (MAX_BOSS_FRAMES -1)))
|
||||
BossHeader:Height(frame.UNIT_HEIGHT)
|
||||
end
|
||||
|
||||
frame:UpdateAllElements('ElvUI_UpdateAllElements')
|
||||
end
|
||||
|
||||
UF.unitgroupstoload.boss = {MAX_BOSS_FRAMES}
|
||||
10
Modules/UnitFrames/Groups/Load_Groups.xml
Normal file
10
Modules/UnitFrames/Groups/Load_Groups.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<Ui xmlns='http://www.blizzard.com/wow/ui/'>
|
||||
<Script file='Party.lua'/>
|
||||
<Script file='Raid.lua'/>
|
||||
<Script file='Raid40.lua'/>
|
||||
<Script file='Arena.lua'/>
|
||||
<Script file='Boss.lua'/>
|
||||
<Script file='Tank.lua'/>
|
||||
<Script file='Assist.lua'/>
|
||||
<Script file='RaidPets.lua'/>
|
||||
</Ui>
|
||||
202
Modules/UnitFrames/Groups/Party.lua
Normal file
202
Modules/UnitFrames/Groups/Party.lua
Normal file
@@ -0,0 +1,202 @@
|
||||
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule('UnitFrames')
|
||||
|
||||
local _, ns = ...
|
||||
local ElvUF = ns.oUF
|
||||
assert(ElvUF, 'ElvUI was unable to locate oUF.')
|
||||
|
||||
local _G = _G
|
||||
local CreateFrame = CreateFrame
|
||||
local InCombatLockdown = InCombatLockdown
|
||||
|
||||
function UF:Construct_PartyFrames()
|
||||
self:SetScript('OnEnter', _G.UnitFrame_OnEnter)
|
||||
self:SetScript('OnLeave', _G.UnitFrame_OnLeave)
|
||||
|
||||
self.RaisedElementParent = CreateFrame('Frame', nil, self)
|
||||
self.RaisedElementParent.TextureParent = CreateFrame('Frame', nil, self.RaisedElementParent)
|
||||
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
||||
self.BORDER = UF.BORDER
|
||||
self.SPACING = UF.SPACING
|
||||
self.SHADOW_SPACING = 3
|
||||
|
||||
if self.isChild then
|
||||
self.Health = UF:Construct_HealthBar(self, true)
|
||||
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||
self.FocusGlow = UF:Construct_FocusGlow(self)
|
||||
self.Name = UF:Construct_NameText(self)
|
||||
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||
self.AuraHighlight = UF:Construct_AuraHighlight(self)
|
||||
|
||||
self.originalParent = self:GetParent()
|
||||
|
||||
self.childType = 'pet'
|
||||
if self == _G[self.originalParent:GetName()..'Target'] then
|
||||
self.childType = 'target'
|
||||
end
|
||||
|
||||
if self.childType == 'pet' then
|
||||
self.AuraWatch = UF:Construct_AuraWatch(self)
|
||||
end
|
||||
|
||||
self.unitframeType = 'party'..self.childType
|
||||
else
|
||||
self.Health = UF:Construct_HealthBar(self, true, true, 'RIGHT')
|
||||
self.Power = UF:Construct_PowerBar(self, true, true, 'LEFT')
|
||||
self.PowerPrediction = UF:Construct_PowerPrediction(self)
|
||||
self.Portrait3D = UF:Construct_Portrait(self, 'model')
|
||||
self.Portrait2D = UF:Construct_Portrait(self, 'texture')
|
||||
self.InfoPanel = UF:Construct_InfoPanel(self)
|
||||
self.Name = UF:Construct_NameText(self)
|
||||
self.Buffs = UF:Construct_Buffs(self)
|
||||
self.Debuffs = UF:Construct_Debuffs(self)
|
||||
self.AuraWatch = UF:Construct_AuraWatch(self)
|
||||
self.RaidDebuffs = UF:Construct_RaidDebuffs(self)
|
||||
self.AuraHighlight = UF:Construct_AuraHighlight(self)
|
||||
self.ResurrectIndicator = UF:Construct_ResurrectionIcon(self)
|
||||
self.SummonIndicator = UF:Construct_SummonIcon(self)
|
||||
self.GroupRoleIndicator = UF:Construct_RoleIcon(self)
|
||||
self.RaidRoleFramesAnchor = UF:Construct_RaidRoleFrames(self)
|
||||
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||
self.PhaseIndicator = UF:Construct_PhaseIcon(self)
|
||||
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||
self.FocusGlow = UF:Construct_FocusGlow(self)
|
||||
self.ThreatIndicator = UF:Construct_Threat(self)
|
||||
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||
self.ReadyCheckIndicator = UF:Construct_ReadyCheckIcon(self)
|
||||
self.HealthPrediction = UF:Construct_HealComm(self)
|
||||
self.AlternativePower = UF:Construct_AltPowerBar(self)
|
||||
self.ClassBar = 'AlternativePower'
|
||||
self.customTexts = {}
|
||||
|
||||
self.Sparkle = CreateFrame('Frame', nil, self)
|
||||
self.Sparkle:SetAllPoints(self.Health)
|
||||
self.Castbar = UF:Construct_Castbar(self)
|
||||
|
||||
self.unitframeType = 'party'
|
||||
end
|
||||
|
||||
self.Fader = UF:Construct_Fader()
|
||||
self.Cutaway = UF:Construct_Cutaway(self)
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function UF:Update_PartyHeader(header, db)
|
||||
local parent = header:GetParent()
|
||||
parent.db = db
|
||||
|
||||
if not parent.positioned then
|
||||
parent:ClearAllPoints()
|
||||
parent:Point('BOTTOMLEFT', E.UIParent, 'BOTTOMLEFT', 4, 248)
|
||||
E:CreateMover(parent, parent:GetName()..'Mover', L["Party Frames"], nil, nil, nil, 'ALL,PARTY,ARENA', nil, 'unitframe,groupUnits,party,generalGroup')
|
||||
parent.positioned = true
|
||||
end
|
||||
end
|
||||
|
||||
function UF:Update_PartyFrames(frame, db)
|
||||
frame.db = db
|
||||
|
||||
frame.colors = ElvUF.colors
|
||||
frame:RegisterForClicks(UF.db.targetOnMouseDown and 'AnyDown' or 'AnyUp')
|
||||
|
||||
do
|
||||
frame.ORIENTATION = db.orientation --allow this value to change when unitframes position changes on screen?
|
||||
frame.UNIT_WIDTH = db.width
|
||||
frame.UNIT_HEIGHT = db.infoPanel.enable and (db.height + db.infoPanel.height) or db.height
|
||||
frame.USE_POWERBAR = db.power.enable
|
||||
frame.POWERBAR_DETACHED = false
|
||||
frame.USE_INSET_POWERBAR = not frame.POWERBAR_DETACHED and db.power.width == 'inset' and frame.USE_POWERBAR
|
||||
frame.USE_MINI_POWERBAR = (not frame.POWERBAR_DETACHED and db.power.width == 'spaced' and frame.USE_POWERBAR)
|
||||
frame.USE_POWERBAR_OFFSET = (db.power.width == 'offset' and db.power.offset ~= 0) and frame.USE_POWERBAR and not frame.POWERBAR_DETACHED
|
||||
frame.POWERBAR_OFFSET = frame.USE_POWERBAR_OFFSET and db.power.offset or 0
|
||||
frame.POWERBAR_HEIGHT = not frame.USE_POWERBAR and 0 or db.power.height
|
||||
frame.POWERBAR_WIDTH = frame.USE_MINI_POWERBAR and (frame.UNIT_WIDTH - (UF.BORDER*2))/2 or (frame.POWERBAR_DETACHED and db.power.detachedWidth or (frame.UNIT_WIDTH - ((UF.BORDER+UF.SPACING)*2)))
|
||||
frame.USE_PORTRAIT = db.portrait and db.portrait.enable
|
||||
frame.USE_PORTRAIT_OVERLAY = frame.USE_PORTRAIT and (db.portrait.overlay or frame.ORIENTATION == 'MIDDLE')
|
||||
frame.PORTRAIT_WIDTH = (frame.USE_PORTRAIT_OVERLAY or not frame.USE_PORTRAIT) and 0 or db.portrait.width
|
||||
frame.CAN_HAVE_CLASSBAR = not frame.isChild
|
||||
frame.MAX_CLASS_BAR = 1
|
||||
frame.USE_CLASSBAR = db.classbar.enable and frame.CAN_HAVE_CLASSBAR
|
||||
frame.CLASSBAR_SHOWN = frame.CAN_HAVE_CLASSBAR and frame[frame.ClassBar] and frame[frame.ClassBar]:IsShown()
|
||||
frame.CLASSBAR_DETACHED = false
|
||||
frame.USE_MINI_CLASSBAR = db.classbar.fill == 'spaced' and frame.USE_CLASSBAR
|
||||
frame.CLASSBAR_HEIGHT = frame.USE_CLASSBAR and db.classbar.height or 0
|
||||
frame.CLASSBAR_WIDTH = frame.UNIT_WIDTH - frame.PORTRAIT_WIDTH - (frame.ORIENTATION == 'MIDDLE' and (frame.POWERBAR_OFFSET*2) or frame.POWERBAR_OFFSET)
|
||||
frame.CLASSBAR_YOFFSET = (not frame.USE_CLASSBAR or not frame.CLASSBAR_SHOWN or frame.CLASSBAR_DETACHED) and 0 or (frame.USE_MINI_CLASSBAR and (UF.SPACING+(frame.CLASSBAR_HEIGHT/2)) or (frame.CLASSBAR_HEIGHT - (UF.BORDER-UF.SPACING)))
|
||||
frame.USE_INFO_PANEL = not frame.USE_MINI_POWERBAR and not frame.USE_POWERBAR_OFFSET and db.infoPanel.enable
|
||||
frame.INFO_PANEL_HEIGHT = frame.USE_INFO_PANEL and db.infoPanel.height or 0
|
||||
frame.BOTTOM_OFFSET = UF:GetHealthBottomOffset(frame)
|
||||
end
|
||||
|
||||
if frame.isChild then
|
||||
frame.USE_PORTAIT = false
|
||||
frame.USE_PORTRAIT_OVERLAY = false
|
||||
frame.PORTRAIT_WIDTH = 0
|
||||
frame.USE_POWERBAR = false
|
||||
frame.USE_INSET_POWERBAR = false
|
||||
frame.USE_MINI_POWERBAR = false
|
||||
frame.USE_POWERBAR_OFFSET = false
|
||||
frame.POWERBAR_OFFSET = 0
|
||||
|
||||
frame.POWERBAR_HEIGHT = 0
|
||||
frame.POWERBAR_WIDTH = 0
|
||||
|
||||
frame.BOTTOM_OFFSET = 0
|
||||
|
||||
frame.db = frame.childType == 'target' and db.targetsGroup or db.petsGroup
|
||||
db = frame.db
|
||||
|
||||
frame:Size(db.width, db.height)
|
||||
|
||||
if not InCombatLockdown() then
|
||||
if db.enable then
|
||||
frame:Enable()
|
||||
frame:ClearAllPoints()
|
||||
frame:Point(E.InversePoints[db.anchorPoint], frame.originalParent, db.anchorPoint, db.xOffset, db.yOffset)
|
||||
else
|
||||
frame:Disable()
|
||||
end
|
||||
end
|
||||
|
||||
if frame.childType == 'pet' then
|
||||
frame.Health.colorPetByUnitClass = db.colorPetByUnitClass
|
||||
UF:Configure_AuraWatch(frame)
|
||||
end
|
||||
UF:Configure_HealthBar(frame)
|
||||
else
|
||||
frame:Size(frame.UNIT_WIDTH, frame.UNIT_HEIGHT)
|
||||
|
||||
UF:EnableDisable_Auras(frame)
|
||||
UF:Configure_AllAuras(frame)
|
||||
UF:Configure_HealthBar(frame)
|
||||
UF:Configure_InfoPanel(frame)
|
||||
UF:Configure_PhaseIcon(frame)
|
||||
UF:Configure_Power(frame)
|
||||
UF:Configure_Portrait(frame)
|
||||
UF:Configure_Threat(frame)
|
||||
UF:Configure_RaidDebuffs(frame)
|
||||
UF:Configure_Castbar(frame)
|
||||
UF:Configure_ResurrectionIcon(frame)
|
||||
UF:Configure_SummonIcon(frame)
|
||||
UF:Configure_RoleIcon(frame)
|
||||
UF:Configure_HealComm(frame)
|
||||
UF:Configure_RaidRoleIcons(frame)
|
||||
UF:Configure_AuraWatch(frame)
|
||||
UF:Configure_ReadyCheckIcon(frame)
|
||||
UF:Configure_ClassBar(frame)
|
||||
UF:Configure_AltPowerBar(frame)
|
||||
UF:Configure_CustomTexts(frame)
|
||||
end
|
||||
|
||||
UF:UpdateNameSettings(frame)
|
||||
UF:Configure_RaidIcon(frame)
|
||||
UF:Configure_Fader(frame)
|
||||
UF:Configure_Cutaway(frame)
|
||||
UF:Configure_AuraHighlight(frame)
|
||||
|
||||
frame:UpdateAllElements('ElvUI_UpdateAllElements')
|
||||
end
|
||||
|
||||
UF.headerstoload.party = {nil, 'ELVUI_UNITPET, ELVUI_UNITTARGET'}
|
||||
140
Modules/UnitFrames/Groups/Raid.lua
Normal file
140
Modules/UnitFrames/Groups/Raid.lua
Normal file
@@ -0,0 +1,140 @@
|
||||
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule('UnitFrames')
|
||||
|
||||
local _, ns = ...
|
||||
local ElvUF = ns.oUF
|
||||
assert(ElvUF, 'ElvUI was unable to locate oUF.')
|
||||
|
||||
local _G = _G
|
||||
local CreateFrame = CreateFrame
|
||||
-- GLOBALS: ElvUF_Raid
|
||||
|
||||
function UF:Construct_RaidFrames()
|
||||
self:SetScript('OnEnter', _G.UnitFrame_OnEnter)
|
||||
self:SetScript('OnLeave', _G.UnitFrame_OnLeave)
|
||||
|
||||
self.RaisedElementParent = CreateFrame('Frame', nil, self)
|
||||
self.RaisedElementParent.TextureParent = CreateFrame('Frame', nil, self.RaisedElementParent)
|
||||
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
||||
|
||||
self.Health = UF:Construct_HealthBar(self, true, true, 'RIGHT')
|
||||
self.Power = UF:Construct_PowerBar(self, true, true, 'LEFT')
|
||||
self.PowerPrediction = UF:Construct_PowerPrediction(self)
|
||||
self.Portrait3D = UF:Construct_Portrait(self, 'model')
|
||||
self.Portrait2D = UF:Construct_Portrait(self, 'texture')
|
||||
self.InfoPanel = UF:Construct_InfoPanel(self)
|
||||
self.Name = UF:Construct_NameText(self)
|
||||
self.Buffs = UF:Construct_Buffs(self)
|
||||
self.Debuffs = UF:Construct_Debuffs(self)
|
||||
self.AuraWatch = UF:Construct_AuraWatch(self)
|
||||
self.RaidDebuffs = UF:Construct_RaidDebuffs(self)
|
||||
self.AuraHighlight = UF:Construct_AuraHighlight(self)
|
||||
self.ResurrectIndicator = UF:Construct_ResurrectionIcon(self)
|
||||
self.SummonIndicator = UF:Construct_SummonIcon(self)
|
||||
self.GroupRoleIndicator = UF:Construct_RoleIcon(self)
|
||||
self.RaidRoleFramesAnchor = UF:Construct_RaidRoleFrames(self)
|
||||
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||
self.PhaseIndicator = UF:Construct_PhaseIcon(self)
|
||||
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||
self.FocusGlow = UF:Construct_FocusGlow(self)
|
||||
self.ThreatIndicator = UF:Construct_Threat(self)
|
||||
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||
self.ReadyCheckIndicator = UF:Construct_ReadyCheckIcon(self)
|
||||
self.HealthPrediction = UF:Construct_HealComm(self)
|
||||
self.Fader = UF:Construct_Fader()
|
||||
self.Cutaway = UF:Construct_Cutaway(self)
|
||||
self.AlternativePower = UF:Construct_AltPowerBar(self)
|
||||
self.ClassBar = 'AlternativePower'
|
||||
self.customTexts = {}
|
||||
|
||||
self.unitframeType = 'raid'
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function UF:Update_RaidHeader(header, db)
|
||||
local parent = header:GetParent()
|
||||
parent.db = db
|
||||
|
||||
if not parent.positioned then
|
||||
parent:ClearAllPoints()
|
||||
parent:Point('BOTTOMLEFT', E.UIParent, 'BOTTOMLEFT', 4, 248)
|
||||
E:CreateMover(parent, parent:GetName()..'Mover', L["Raid Frames"], nil, nil, nil, 'ALL,RAID', nil, 'unitframe,groupUnits,raid,generalGroup')
|
||||
parent.positioned = true
|
||||
end
|
||||
end
|
||||
|
||||
function UF:Update_RaidFrames(frame, db)
|
||||
frame.db = db
|
||||
|
||||
frame.colors = ElvUF.colors
|
||||
frame:RegisterForClicks(self.db.targetOnMouseDown and 'AnyDown' or 'AnyUp')
|
||||
|
||||
do
|
||||
frame.SHADOW_SPACING = 3
|
||||
frame.ORIENTATION = db.orientation --allow this value to change when unitframes position changes on screen?
|
||||
frame.UNIT_WIDTH = db.width
|
||||
frame.UNIT_HEIGHT = db.infoPanel.enable and (db.height + db.infoPanel.height) or db.height
|
||||
frame.USE_POWERBAR = db.power.enable
|
||||
frame.POWERBAR_DETACHED = false
|
||||
frame.USE_INSET_POWERBAR = not frame.POWERBAR_DETACHED and db.power.width == 'inset' and frame.USE_POWERBAR
|
||||
frame.USE_MINI_POWERBAR = (not frame.POWERBAR_DETACHED and db.power.width == 'spaced' and frame.USE_POWERBAR)
|
||||
frame.USE_POWERBAR_OFFSET = (db.power.width == 'offset' and db.power.offset ~= 0) and frame.USE_POWERBAR and not frame.POWERBAR_DETACHED
|
||||
frame.POWERBAR_OFFSET = frame.USE_POWERBAR_OFFSET and db.power.offset or 0
|
||||
frame.POWERBAR_HEIGHT = not frame.USE_POWERBAR and 0 or db.power.height
|
||||
frame.POWERBAR_WIDTH = frame.USE_MINI_POWERBAR and (frame.UNIT_WIDTH - (UF.BORDER*2))/2 or (frame.POWERBAR_DETACHED and db.power.detachedWidth or (frame.UNIT_WIDTH - ((UF.BORDER+UF.SPACING)*2)))
|
||||
frame.USE_PORTRAIT = db.portrait and db.portrait.enable
|
||||
frame.USE_PORTRAIT_OVERLAY = frame.USE_PORTRAIT and (db.portrait.overlay or frame.ORIENTATION == 'MIDDLE')
|
||||
frame.PORTRAIT_WIDTH = (frame.USE_PORTRAIT_OVERLAY or not frame.USE_PORTRAIT) and 0 or db.portrait.width
|
||||
frame.CAN_HAVE_CLASSBAR = not frame.isChild
|
||||
frame.MAX_CLASS_BAR = 1
|
||||
frame.USE_CLASSBAR = db.classbar.enable and frame.CAN_HAVE_CLASSBAR
|
||||
frame.CLASSBAR_SHOWN = frame.CAN_HAVE_CLASSBAR and frame[frame.ClassBar] and frame[frame.ClassBar]:IsShown()
|
||||
frame.CLASSBAR_DETACHED = false
|
||||
frame.USE_MINI_CLASSBAR = db.classbar.fill == 'spaced' and frame.USE_CLASSBAR
|
||||
frame.CLASSBAR_HEIGHT = frame.USE_CLASSBAR and db.classbar.height or 0
|
||||
frame.CLASSBAR_WIDTH = frame.UNIT_WIDTH - frame.PORTRAIT_WIDTH - (frame.ORIENTATION == 'MIDDLE' and (frame.POWERBAR_OFFSET*2) or frame.POWERBAR_OFFSET)
|
||||
frame.CLASSBAR_YOFFSET = (not frame.USE_CLASSBAR or not frame.CLASSBAR_SHOWN or frame.CLASSBAR_DETACHED) and 0 or (frame.USE_MINI_CLASSBAR and (UF.SPACING+(frame.CLASSBAR_HEIGHT/2)) or (frame.CLASSBAR_HEIGHT - (UF.BORDER-UF.SPACING)))
|
||||
frame.USE_INFO_PANEL = not frame.USE_MINI_POWERBAR and not frame.USE_POWERBAR_OFFSET and db.infoPanel.enable
|
||||
frame.INFO_PANEL_HEIGHT = frame.USE_INFO_PANEL and db.infoPanel.height or 0
|
||||
frame.BOTTOM_OFFSET = UF:GetHealthBottomOffset(frame)
|
||||
end
|
||||
|
||||
if db.enable and not frame:IsEnabled() then
|
||||
frame:Enable()
|
||||
elseif not db.enable and frame:IsEnabled() then
|
||||
frame:Disable()
|
||||
end
|
||||
|
||||
frame:Size(frame.UNIT_WIDTH, frame.UNIT_HEIGHT)
|
||||
|
||||
UF:EnableDisable_Auras(frame)
|
||||
UF:Configure_AllAuras(frame)
|
||||
UF:Configure_InfoPanel(frame)
|
||||
UF:Configure_HealthBar(frame)
|
||||
UF:Configure_Power(frame)
|
||||
UF:Configure_PowerPrediction(frame)
|
||||
UF:Configure_Portrait(frame)
|
||||
UF:Configure_Threat(frame)
|
||||
UF:Configure_RaidDebuffs(frame)
|
||||
UF:Configure_RaidIcon(frame)
|
||||
UF:Configure_ResurrectionIcon(frame)
|
||||
UF:Configure_SummonIcon(frame)
|
||||
UF:Configure_AuraHighlight(frame)
|
||||
UF:Configure_RoleIcon(frame)
|
||||
UF:Configure_HealComm(frame)
|
||||
UF:Configure_RaidRoleIcons(frame)
|
||||
UF:Configure_Fader(frame)
|
||||
UF:Configure_AuraWatch(frame)
|
||||
UF:Configure_ReadyCheckIcon(frame)
|
||||
UF:Configure_CustomTexts(frame)
|
||||
UF:Configure_PhaseIcon(frame)
|
||||
UF:Configure_Cutaway(frame)
|
||||
UF:Configure_ClassBar(frame)
|
||||
UF:Configure_AltPowerBar(frame)
|
||||
UF:UpdateNameSettings(frame)
|
||||
|
||||
frame:UpdateAllElements('ElvUI_UpdateAllElements')
|
||||
end
|
||||
|
||||
UF.headerstoload.raid = true
|
||||
140
Modules/UnitFrames/Groups/Raid40.lua
Normal file
140
Modules/UnitFrames/Groups/Raid40.lua
Normal file
@@ -0,0 +1,140 @@
|
||||
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule('UnitFrames')
|
||||
|
||||
local _, ns = ...
|
||||
local ElvUF = ns.oUF
|
||||
assert(ElvUF, 'ElvUI was unable to locate oUF.')
|
||||
|
||||
local _G = _G
|
||||
local CreateFrame = CreateFrame
|
||||
-- GLOBALS: ElvUF_Raid40
|
||||
|
||||
function UF:Construct_Raid40Frames()
|
||||
self:SetScript('OnEnter', _G.UnitFrame_OnEnter)
|
||||
self:SetScript('OnLeave', _G.UnitFrame_OnLeave)
|
||||
|
||||
self.RaisedElementParent = CreateFrame('Frame', nil, self)
|
||||
self.RaisedElementParent.TextureParent = CreateFrame('Frame', nil, self.RaisedElementParent)
|
||||
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
||||
|
||||
self.Health = UF:Construct_HealthBar(self, true, true, 'RIGHT')
|
||||
self.Power = UF:Construct_PowerBar(self, true, true, 'LEFT')
|
||||
self.PowerPrediction = UF:Construct_PowerPrediction(self)
|
||||
self.Portrait3D = UF:Construct_Portrait(self, 'model')
|
||||
self.Portrait2D = UF:Construct_Portrait(self, 'texture')
|
||||
self.Name = UF:Construct_NameText(self)
|
||||
self.Buffs = UF:Construct_Buffs(self)
|
||||
self.Debuffs = UF:Construct_Debuffs(self)
|
||||
self.AuraWatch = UF:Construct_AuraWatch(self)
|
||||
self.RaidDebuffs = UF:Construct_RaidDebuffs(self)
|
||||
self.AuraHighlight = UF:Construct_AuraHighlight(self)
|
||||
self.ResurrectIndicator = UF:Construct_ResurrectionIcon(self)
|
||||
self.SummonIndicator = UF:Construct_SummonIcon(self)
|
||||
self.GroupRoleIndicator = UF:Construct_RoleIcon(self)
|
||||
self.RaidRoleFramesAnchor = UF:Construct_RaidRoleFrames(self)
|
||||
self.PhaseIndicator = UF:Construct_PhaseIcon(self)
|
||||
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||
self.FocusGlow = UF:Construct_FocusGlow(self)
|
||||
self.InfoPanel = UF:Construct_InfoPanel(self)
|
||||
self.ThreatIndicator = UF:Construct_Threat(self)
|
||||
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||
self.ReadyCheckIndicator = UF:Construct_ReadyCheckIcon(self)
|
||||
self.HealthPrediction = UF:Construct_HealComm(self)
|
||||
self.Fader = UF:Construct_Fader()
|
||||
self.Cutaway = UF:Construct_Cutaway(self)
|
||||
self.AlternativePower = UF:Construct_AltPowerBar(self)
|
||||
self.ClassBar = 'AlternativePower'
|
||||
self.customTexts = {}
|
||||
|
||||
self.unitframeType = 'raid40'
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function UF:Update_Raid40Header(header, db)
|
||||
local parent = header:GetParent()
|
||||
parent.db = db
|
||||
|
||||
if not parent.positioned then
|
||||
parent:ClearAllPoints()
|
||||
parent:Point('TOPLEFT', E.UIParent, 'BOTTOMLEFT', 4, 482)
|
||||
E:CreateMover(parent, parent:GetName()..'Mover', L["Raid-40 Frames"], nil, nil, nil, 'ALL,RAID', nil, 'unitframe,groupUnits,raid40,generalGroup')
|
||||
parent.positioned = true
|
||||
end
|
||||
end
|
||||
|
||||
function UF:Update_Raid40Frames(frame, db)
|
||||
frame.db = db
|
||||
|
||||
frame.colors = ElvUF.colors
|
||||
frame:RegisterForClicks(self.db.targetOnMouseDown and 'AnyDown' or 'AnyUp')
|
||||
|
||||
do
|
||||
frame.SHADOW_SPACING = 3
|
||||
frame.ORIENTATION = db.orientation --allow this value to change when unitframes position changes on screen?
|
||||
frame.UNIT_WIDTH = db.width
|
||||
frame.UNIT_HEIGHT = db.infoPanel.enable and (db.height + db.infoPanel.height) or db.height
|
||||
frame.USE_POWERBAR = db.power.enable
|
||||
frame.POWERBAR_DETACHED = false
|
||||
frame.USE_INSET_POWERBAR = not frame.POWERBAR_DETACHED and db.power.width == 'inset' and frame.USE_POWERBAR
|
||||
frame.USE_MINI_POWERBAR = (not frame.POWERBAR_DETACHED and db.power.width == 'spaced' and frame.USE_POWERBAR)
|
||||
frame.USE_POWERBAR_OFFSET = (db.power.width == 'offset' and db.power.offset ~= 0) and frame.USE_POWERBAR and not frame.POWERBAR_DETACHED
|
||||
frame.POWERBAR_OFFSET = frame.USE_POWERBAR_OFFSET and db.power.offset or 0
|
||||
frame.POWERBAR_HEIGHT = not frame.USE_POWERBAR and 0 or db.power.height
|
||||
frame.POWERBAR_WIDTH = frame.USE_MINI_POWERBAR and (frame.UNIT_WIDTH - (UF.BORDER*2))/2 or (frame.POWERBAR_DETACHED and db.power.detachedWidth or (frame.UNIT_WIDTH - ((UF.BORDER+UF.SPACING)*2)))
|
||||
frame.USE_PORTRAIT = db.portrait and db.portrait.enable
|
||||
frame.USE_PORTRAIT_OVERLAY = frame.USE_PORTRAIT and (db.portrait.overlay or frame.ORIENTATION == 'MIDDLE')
|
||||
frame.PORTRAIT_WIDTH = (frame.USE_PORTRAIT_OVERLAY or not frame.USE_PORTRAIT) and 0 or db.portrait.width
|
||||
frame.CAN_HAVE_CLASSBAR = not frame.isChild
|
||||
frame.MAX_CLASS_BAR = 1
|
||||
frame.USE_CLASSBAR = db.classbar.enable and frame.CAN_HAVE_CLASSBAR
|
||||
frame.CLASSBAR_SHOWN = frame.CAN_HAVE_CLASSBAR and frame[frame.ClassBar] and frame[frame.ClassBar]:IsShown()
|
||||
frame.CLASSBAR_DETACHED = false
|
||||
frame.USE_MINI_CLASSBAR = db.classbar.fill == 'spaced' and frame.USE_CLASSBAR
|
||||
frame.CLASSBAR_HEIGHT = frame.USE_CLASSBAR and db.classbar.height or 0
|
||||
frame.CLASSBAR_WIDTH = frame.UNIT_WIDTH - frame.PORTRAIT_WIDTH - (frame.ORIENTATION == 'MIDDLE' and (frame.POWERBAR_OFFSET*2) or frame.POWERBAR_OFFSET)
|
||||
frame.CLASSBAR_YOFFSET = (not frame.USE_CLASSBAR or not frame.CLASSBAR_SHOWN or frame.CLASSBAR_DETACHED) and 0 or (frame.USE_MINI_CLASSBAR and (UF.SPACING+(frame.CLASSBAR_HEIGHT/2)) or (frame.CLASSBAR_HEIGHT - (UF.BORDER-UF.SPACING)))
|
||||
frame.USE_INFO_PANEL = not frame.USE_MINI_POWERBAR and not frame.USE_POWERBAR_OFFSET and db.infoPanel.enable
|
||||
frame.INFO_PANEL_HEIGHT = frame.USE_INFO_PANEL and db.infoPanel.height or 0
|
||||
frame.BOTTOM_OFFSET = UF:GetHealthBottomOffset(frame)
|
||||
end
|
||||
|
||||
if db.enable and not frame:IsEnabled() then
|
||||
frame:Enable()
|
||||
elseif not db.enable and frame:IsEnabled() then
|
||||
frame:Disable()
|
||||
end
|
||||
|
||||
frame:Size(frame.UNIT_WIDTH, frame.UNIT_HEIGHT)
|
||||
|
||||
UF:EnableDisable_Auras(frame)
|
||||
UF:Configure_AllAuras(frame)
|
||||
UF:Configure_InfoPanel(frame)
|
||||
UF:Configure_HealthBar(frame)
|
||||
UF:Configure_Power(frame)
|
||||
UF:Configure_PowerPrediction(frame)
|
||||
UF:Configure_Portrait(frame)
|
||||
UF:Configure_Threat(frame)
|
||||
UF:Configure_RaidDebuffs(frame)
|
||||
UF:Configure_RaidIcon(frame)
|
||||
UF:Configure_ResurrectionIcon(frame)
|
||||
UF:Configure_SummonIcon(frame)
|
||||
UF:Configure_AuraHighlight(frame)
|
||||
UF:Configure_RoleIcon(frame)
|
||||
UF:Configure_HealComm(frame)
|
||||
UF:Configure_RaidRoleIcons(frame)
|
||||
UF:Configure_Fader(frame)
|
||||
UF:Configure_AuraWatch(frame)
|
||||
UF:Configure_ReadyCheckIcon(frame)
|
||||
UF:Configure_CustomTexts(frame)
|
||||
UF:Configure_PhaseIcon(frame)
|
||||
UF:Configure_Cutaway(frame)
|
||||
UF:Configure_ClassBar(frame)
|
||||
UF:Configure_AltPowerBar(frame)
|
||||
UF:UpdateNameSettings(frame)
|
||||
|
||||
frame:UpdateAllElements('ElvUI_UpdateAllElements')
|
||||
end
|
||||
|
||||
UF.headerstoload.raid40 = true
|
||||
104
Modules/UnitFrames/Groups/RaidPets.lua
Normal file
104
Modules/UnitFrames/Groups/RaidPets.lua
Normal file
@@ -0,0 +1,104 @@
|
||||
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule('UnitFrames')
|
||||
|
||||
local _, ns = ...
|
||||
local ElvUF = ns.oUF
|
||||
assert(ElvUF, 'ElvUI was unable to locate oUF.')
|
||||
|
||||
local _G = _G
|
||||
local CreateFrame = CreateFrame
|
||||
|
||||
function UF:Construct_RaidpetFrames()
|
||||
self:SetScript('OnEnter', _G.UnitFrame_OnEnter)
|
||||
self:SetScript('OnLeave', _G.UnitFrame_OnLeave)
|
||||
|
||||
self.RaisedElementParent = CreateFrame('Frame', nil, self)
|
||||
self.RaisedElementParent.TextureParent = CreateFrame('Frame', nil, self.RaisedElementParent)
|
||||
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
||||
|
||||
self.Health = UF:Construct_HealthBar(self, true, true, 'RIGHT')
|
||||
self.Name = UF:Construct_NameText(self)
|
||||
self.Portrait3D = UF:Construct_Portrait(self, 'model')
|
||||
self.Portrait2D = UF:Construct_Portrait(self, 'texture')
|
||||
self.Buffs = UF:Construct_Buffs(self)
|
||||
self.Debuffs = UF:Construct_Debuffs(self)
|
||||
self.AuraWatch = UF:Construct_AuraWatch(self)
|
||||
self.RaidDebuffs = UF:Construct_RaidDebuffs(self)
|
||||
self.AuraHighlight = UF:Construct_AuraHighlight(self)
|
||||
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||
self.FocusGlow = UF:Construct_FocusGlow(self)
|
||||
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||
self.ThreatIndicator = UF:Construct_Threat(self)
|
||||
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||
self.HealthPrediction = UF:Construct_HealComm(self)
|
||||
self.Fader = UF:Construct_Fader()
|
||||
self.Cutaway = UF:Construct_Cutaway(self)
|
||||
|
||||
self.customTexts = {}
|
||||
|
||||
self.unitframeType = 'raidpet'
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function UF:Update_RaidpetHeader(header, db)
|
||||
local parent = header:GetParent()
|
||||
parent.db = db
|
||||
|
||||
if not parent.positioned then
|
||||
parent:ClearAllPoints()
|
||||
parent:Point('TOPLEFT', E.UIParent, 'BOTTOMLEFT', 4, 737)
|
||||
E:CreateMover(parent, parent:GetName()..'Mover', L["Raid Pet Frames"], nil, nil, nil, 'ALL,RAID', nil, 'unitframe,groupUnits,raidpet,generalGroup')
|
||||
parent.positioned = true
|
||||
end
|
||||
end
|
||||
|
||||
function UF:Update_RaidpetFrames(frame, db)
|
||||
frame.db = db
|
||||
|
||||
frame.colors = ElvUF.colors
|
||||
frame:RegisterForClicks(UF.db.targetOnMouseDown and 'AnyDown' or 'AnyUp')
|
||||
|
||||
do
|
||||
frame.SHADOW_SPACING = 3
|
||||
frame.ORIENTATION = db.orientation --allow this value to change when unitframes position changes on screen?
|
||||
frame.UNIT_WIDTH = db.width
|
||||
frame.UNIT_HEIGHT = db.height
|
||||
frame.USE_POWERBAR = false
|
||||
frame.POWERBAR_DETACHED = false
|
||||
frame.USE_INSET_POWERBAR = false
|
||||
frame.USE_MINI_POWERBAR = false
|
||||
frame.USE_POWERBAR_OFFSET = false
|
||||
frame.POWERBAR_OFFSET = 0
|
||||
frame.POWERBAR_HEIGHT = 0
|
||||
frame.POWERBAR_WIDTH = 0
|
||||
frame.USE_PORTRAIT = db.portrait and db.portrait.enable
|
||||
frame.USE_PORTRAIT_OVERLAY = frame.USE_PORTRAIT and (db.portrait.overlay or frame.ORIENTATION == 'MIDDLE')
|
||||
frame.PORTRAIT_WIDTH = (frame.USE_PORTRAIT_OVERLAY or not frame.USE_PORTRAIT) and 0 or db.portrait.width
|
||||
frame.CLASSBAR_YOFFSET = 0
|
||||
frame.BOTTOM_OFFSET = 0
|
||||
end
|
||||
|
||||
frame.Health.colorPetByUnitClass = db.health.colorPetByUnitClass
|
||||
frame:Size(frame.UNIT_WIDTH, frame.UNIT_HEIGHT)
|
||||
|
||||
UF:Configure_HealthBar(frame)
|
||||
UF:UpdateNameSettings(frame)
|
||||
UF:Configure_Portrait(frame)
|
||||
UF:Configure_Threat(frame)
|
||||
UF:EnableDisable_Auras(frame)
|
||||
UF:Configure_AllAuras(frame)
|
||||
UF:Configure_RaidDebuffs(frame)
|
||||
UF:Configure_RaidIcon(frame)
|
||||
UF:Configure_AuraHighlight(frame)
|
||||
UF:Configure_HealComm(frame)
|
||||
UF:Configure_Fader(frame)
|
||||
UF:Configure_AuraWatch(frame, true)
|
||||
UF:Configure_Cutaway(frame)
|
||||
UF:Configure_CustomTexts(frame)
|
||||
|
||||
frame:UpdateAllElements('ElvUI_UpdateAllElements')
|
||||
end
|
||||
|
||||
--Added an additional argument at the end, specifying the header Template we want to use
|
||||
UF.headerstoload.raidpet = {nil, nil, 'SecureGroupPetHeaderTemplate'}
|
||||
150
Modules/UnitFrames/Groups/Tank.lua
Normal file
150
Modules/UnitFrames/Groups/Tank.lua
Normal file
@@ -0,0 +1,150 @@
|
||||
local E, L, V, P, G = unpack(select(2, ...)); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule('UnitFrames')
|
||||
|
||||
local _, ns = ...
|
||||
local ElvUF = ns.oUF
|
||||
assert(ElvUF, 'ElvUI was unable to locate oUF.')
|
||||
|
||||
local _G = _G
|
||||
local max = max
|
||||
local CreateFrame = CreateFrame
|
||||
local IsAddOnLoaded = IsAddOnLoaded
|
||||
local InCombatLockdown = InCombatLockdown
|
||||
local RegisterAttributeDriver = RegisterAttributeDriver
|
||||
|
||||
function UF:Construct_TankFrames()
|
||||
self:SetScript('OnEnter', _G.UnitFrame_OnEnter)
|
||||
self:SetScript('OnLeave', _G.UnitFrame_OnLeave)
|
||||
|
||||
self.RaisedElementParent = CreateFrame('Frame', nil, self)
|
||||
self.RaisedElementParent.TextureParent = CreateFrame('Frame', nil, self.RaisedElementParent)
|
||||
self.RaisedElementParent:SetFrameLevel(self:GetFrameLevel() + 100)
|
||||
|
||||
self.Health = UF:Construct_HealthBar(self, true)
|
||||
self.Name = UF:Construct_NameText(self)
|
||||
self.ThreatIndicator = UF:Construct_Threat(self)
|
||||
self.RaidTargetIndicator = UF:Construct_RaidIcon(self)
|
||||
self.MouseGlow = UF:Construct_MouseGlow(self)
|
||||
self.TargetGlow = UF:Construct_TargetGlow(self)
|
||||
self.FocusGlow = UF:Construct_FocusGlow(self)
|
||||
self.Fader = UF:Construct_Fader()
|
||||
self.Cutaway = UF:Construct_Cutaway(self)
|
||||
|
||||
if not self.isChild then
|
||||
self.Buffs = UF:Construct_Buffs(self)
|
||||
self.Debuffs = UF:Construct_Debuffs(self)
|
||||
self.AuraWatch = UF:Construct_AuraWatch(self)
|
||||
self.RaidDebuffs = UF:Construct_RaidDebuffs(self)
|
||||
self.AuraHighlight = UF:Construct_AuraHighlight(self)
|
||||
|
||||
self.unitframeType = 'tank'
|
||||
else
|
||||
self.unitframeType = 'tanktarget'
|
||||
end
|
||||
|
||||
self.originalParent = self:GetParent()
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
function UF:Update_TankHeader(header, db)
|
||||
header:Hide()
|
||||
header.db = db
|
||||
|
||||
UF:ClearChildPoints(header:GetChildren())
|
||||
|
||||
if not header.isForced and db.enable then
|
||||
RegisterAttributeDriver(header, 'state-visibility', '[@raid1,exists] show;hide')
|
||||
end
|
||||
|
||||
header:SetAttribute('point', 'BOTTOM')
|
||||
header:SetAttribute('columnAnchorPoint', 'LEFT')
|
||||
header:SetAttribute('yOffset', db.verticalSpacing)
|
||||
|
||||
if not header.positioned then
|
||||
header:ClearAllPoints()
|
||||
header:Point('TOPLEFT', E.UIParent, 'TOPLEFT', 4, -186)
|
||||
|
||||
local width, height = header:GetSize()
|
||||
local minHeight = max(height, 2*db.height + db.verticalSpacing)
|
||||
header:SetAttribute('minHeight', minHeight)
|
||||
header:SetAttribute('minWidth', width)
|
||||
|
||||
E:CreateMover(header, header:GetName()..'Mover', L["MT Frames"], nil, nil, nil, 'ALL,RAID', nil, 'unitframe,groupUnits,tank,generalGroup')
|
||||
header.mover:SetSize(width, minHeight)
|
||||
|
||||
header.positioned = true
|
||||
end
|
||||
end
|
||||
|
||||
function UF:Update_TankFrames(frame, db)
|
||||
frame.db = db
|
||||
frame.colors = ElvUF.colors
|
||||
frame:RegisterForClicks(UF.db.targetOnMouseDown and 'AnyDown' or 'AnyUp')
|
||||
|
||||
do
|
||||
frame.ORIENTATION = db.orientation --allow this value to change when unitframes position changes on screen?
|
||||
frame.SHADOW_SPACING = 3
|
||||
frame.UNIT_WIDTH = db.width
|
||||
frame.UNIT_HEIGHT = db.height
|
||||
frame.USE_POWERBAR = false
|
||||
frame.POWERBAR_DETACHED = false
|
||||
frame.USE_INSET_POWERBAR = false
|
||||
frame.USE_MINI_POWERBAR = false
|
||||
frame.USE_POWERBAR_OFFSET = false
|
||||
frame.POWERBAR_OFFSET = 0
|
||||
frame.POWERBAR_HEIGHT = 0
|
||||
frame.POWERBAR_WIDTH = 0
|
||||
frame.USE_PORTRAIT = false
|
||||
frame.USE_PORTRAIT_OVERLAY = false
|
||||
frame.PORTRAIT_WIDTH = 0
|
||||
frame.CLASSBAR_YOFFSET = 0
|
||||
frame.BOTTOM_OFFSET = 0
|
||||
end
|
||||
|
||||
if frame.isChild then
|
||||
local childDB = db.targetsGroup
|
||||
frame.db = db.targetsGroup
|
||||
|
||||
frame:Size(childDB.width, childDB.height)
|
||||
|
||||
if not InCombatLockdown() then
|
||||
if childDB.enable then
|
||||
frame:Enable()
|
||||
frame:ClearAllPoints()
|
||||
frame:Point(E.InversePoints[childDB.anchorPoint], frame.originalParent, childDB.anchorPoint, childDB.xOffset, childDB.yOffset)
|
||||
else
|
||||
frame:Disable()
|
||||
end
|
||||
end
|
||||
else
|
||||
frame:Size(frame.UNIT_WIDTH, frame.UNIT_HEIGHT)
|
||||
end
|
||||
|
||||
UF:Configure_HealthBar(frame)
|
||||
UF:UpdateNameSettings(frame)
|
||||
UF:Configure_Threat(frame)
|
||||
UF:Configure_Fader(frame)
|
||||
UF:Configure_Cutaway(frame)
|
||||
UF:Configure_RaidIcon(frame)
|
||||
|
||||
if not frame.isChild then
|
||||
if not IsAddOnLoaded('Clique') then
|
||||
if db.middleClickFocus then
|
||||
frame:SetAttribute('type3', 'focus')
|
||||
elseif frame:GetAttribute('type3') == 'focus' then
|
||||
frame:SetAttribute('type3', nil)
|
||||
end
|
||||
end
|
||||
|
||||
UF:EnableDisable_Auras(frame)
|
||||
UF:Configure_AllAuras(frame)
|
||||
UF:Configure_RaidDebuffs(frame)
|
||||
UF:Configure_AuraHighlight(frame)
|
||||
UF:Configure_AuraWatch(frame)
|
||||
end
|
||||
|
||||
frame:UpdateAllElements('ElvUI_UpdateAllElements')
|
||||
end
|
||||
|
||||
UF.headerstoload.tank = {'MAINTANK', 'ELVUI_UNITTARGET'}
|
||||
Reference in New Issue
Block a user