mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
@@ -12,19 +12,20 @@ assert(ElvUF, "ElvUI was unable to locate oUF.")
|
||||
function UF:Construct_PetFrame(frame)
|
||||
frame.Health = self:Construct_HealthBar(frame, true, true, "RIGHT")
|
||||
frame.Health.frequentUpdates = true
|
||||
|
||||
frame.Power = self:Construct_PowerBar(frame, true, true, "LEFT")
|
||||
frame.Power.frequentUpdates = true
|
||||
|
||||
frame.Name = self:Construct_NameText(frame)
|
||||
|
||||
frame.Portrait3D = self:Construct_Portrait(frame, "model")
|
||||
frame.Portrait2D = self:Construct_Portrait(frame, "texture")
|
||||
frame.Buffs = self:Construct_Buffs(frame)
|
||||
frame.Debuffs = self:Construct_Debuffs(frame)
|
||||
frame.InfoPanel = self:Construct_InfoPanel(frame)
|
||||
frame.Range = self:Construct_Range(frame)
|
||||
if E.myclass == "HUNTER" then
|
||||
frame.HappinessIndicator = self:Construct_Happiness(frame)
|
||||
end
|
||||
frame.MouseGlow = self:Construct_MouseGlow(frame)
|
||||
frame.TargetGlow = self:Construct_TargetGlow(frame)
|
||||
frame.InfoPanel = self:Construct_InfoPanel(frame)
|
||||
frame.customTexts = {}
|
||||
|
||||
E:Point(frame, "BOTTOM", E.UIParent, "BOTTOM", 0, 118)
|
||||
E:CreateMover(frame, frame:GetName().."Mover", L["Pet Frame"], nil, nil, nil, "ALL,SOLO")
|
||||
@@ -56,6 +57,9 @@ function UF:Update_PetFrame(frame, db)
|
||||
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.HAPPINESS_SHOWN = frame.HappinessIndicator and frame.HappinessIndicator:IsShown()
|
||||
frame.HAPPINESS_WIDTH = frame.HAPPINESS_SHOWN and (db.happiness.width + (frame.BORDER*2)) or 0
|
||||
|
||||
frame.BOTTOM_OFFSET = UF:GetHealthBottomOffset(frame)
|
||||
|
||||
frame.VARIABLES_SET = true
|
||||
@@ -64,7 +68,6 @@ function UF:Update_PetFrame(frame, db)
|
||||
frame.colors = ElvUF.colors
|
||||
frame.Portrait = frame.Portrait or (db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D)
|
||||
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "LeftButtonUp", self.db.targetOnMouseDown and "RightButtonDown" or "RightButtonUp")
|
||||
|
||||
E:Size(frame, frame.UNIT_WIDTH, frame.UNIT_HEIGHT)
|
||||
E:Size(_G[frame:GetName().."Mover"], frame:GetWidth(), frame:GetHeight())
|
||||
|
||||
@@ -82,8 +85,15 @@ function UF:Update_PetFrame(frame, db)
|
||||
UF:Configure_Auras(frame, "Buffs")
|
||||
UF:Configure_Auras(frame, "Debuffs")
|
||||
|
||||
E:SetMoverSnapOffset(frame:GetName().."Mover", -(12 + db.castbar.height))
|
||||
UF:Configure_Range(frame)
|
||||
|
||||
if E.myclass == "HUNTER" then
|
||||
UF:Configure_Happiness(frame)
|
||||
end
|
||||
|
||||
UF:Configure_CustomTexts(frame)
|
||||
|
||||
frame:UpdateAllElements("ElvUI_UpdateAllElements")
|
||||
end
|
||||
|
||||
tinsert(UF.unitstoload, "pet")
|
||||
tinsert(UF.unitstoload, "pet")
|
||||
|
||||
@@ -4,6 +4,8 @@ local UF = E:GetModule("UnitFrames");
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
local _G = _G
|
||||
--WoW API / Variables
|
||||
local CreateFrame = CreateFrame
|
||||
|
||||
local ns = oUF
|
||||
local ElvUF = ns.oUF
|
||||
@@ -14,25 +16,40 @@ local CAN_HAVE_CLASSBAR = E.myclass == "DRUID"
|
||||
function UF:Construct_PlayerFrame(frame)
|
||||
frame.Health = self:Construct_HealthBar(frame, true, true, "RIGHT")
|
||||
frame.Health.frequentUpdates = true
|
||||
|
||||
frame.Power = self:Construct_PowerBar(frame, true, true, "LEFT")
|
||||
frame.Power.frequentUpdates = true
|
||||
|
||||
frame.Name = self:Construct_NameText(frame)
|
||||
|
||||
frame.Portrait3D = self:Construct_Portrait(frame, "model")
|
||||
frame.Portrait2D = self:Construct_Portrait(frame, "texture")
|
||||
frame.Buffs = self:Construct_Buffs(frame)
|
||||
frame.Debuffs = self:Construct_Debuffs(frame)
|
||||
frame.Castbar = self:Construct_Castbar(frame, L["Player Castbar"])
|
||||
frame.RaidTargetIndicator = UF:Construct_RaidIcon(frame)
|
||||
|
||||
if CAN_HAVE_CLASSBAR then
|
||||
frame.ClassBarHolder = CreateFrame("Frame", nil, frame)
|
||||
E:Point(frame.ClassBarHolder, "BOTTOM", E.UIParent, "BOTTOM", 0, 150)
|
||||
end
|
||||
|
||||
if E.myclass == "DRUID" then
|
||||
frame.DruidAltMana = self:Construct_DruidAltMana(frame)
|
||||
frame.ClassBar = "DruidAltMana"
|
||||
end
|
||||
|
||||
frame.MouseGlow = self:Construct_MouseGlow(frame)
|
||||
frame.TargetGlow = self:Construct_TargetGlow(frame)
|
||||
frame.RaidTargetIndicator = self:Construct_RaidIcon(frame)
|
||||
frame.RaidRoleFramesAnchor = self:Construct_RaidRoleFrames(frame)
|
||||
frame.RestingIndicator = self:Construct_RestingIndicator(frame)
|
||||
frame.CombatIndicator = self:Construct_CombatIndicator(frame)
|
||||
frame.PvPText = self:Construct_PvPIndicator(frame)
|
||||
frame.DebuffHighlight = self:Construct_DebuffHighlight(frame)
|
||||
frame.InfoPanel = self:Construct_InfoPanel(frame)
|
||||
frame.PvPIndicator = self:Construct_PvPIcon(frame)
|
||||
frame.CombatFade = true
|
||||
frame.customTexts = {}
|
||||
|
||||
frame:SetPoint("BOTTOMLEFT", E.UIParent, "BOTTOM", -413, 68)
|
||||
E:CreateMover(frame, frame:GetName().."Mover", L["Player Frame"], nil, nil, nil, "ALL,SOLO")
|
||||
E:Point(frame, "BOTTOMLEFT", E.UIParent, "BOTTOM", -413, 68)
|
||||
E:CreateMover(frame, frame:GetName().."Mover", L["Player Frame"], nil, nil, nil, "ALL,SOLO", nil, "unitframe,player,generalGroup")
|
||||
frame.unitframeType = "player"
|
||||
end
|
||||
|
||||
@@ -61,7 +78,7 @@ function UF:Update_PlayerFrame(frame, db)
|
||||
frame.CAN_HAVE_CLASSBAR = CAN_HAVE_CLASSBAR
|
||||
frame.MAX_CLASS_BAR = frame.MAX_CLASS_BAR or UF.classMaxResourceBar[E.myclass] or 0
|
||||
frame.USE_CLASSBAR = db.classbar.enable and frame.CAN_HAVE_CLASSBAR
|
||||
frame.CLASSBAR_SHOWN = frame.CAN_HAVE_CLASSBAR and frame.ClassBar and frame[frame.ClassBar]:IsShown()
|
||||
frame.CLASSBAR_SHOWN = frame.CAN_HAVE_CLASSBAR and frame[frame.ClassBar]:IsShown()
|
||||
frame.CLASSBAR_DETACHED = db.classbar.detachFromFrame
|
||||
frame.USE_MINI_CLASSBAR = db.classbar.fill == "spaced" and frame.USE_CLASSBAR
|
||||
frame.CLASSBAR_HEIGHT = frame.USE_CLASSBAR and db.classbar.height or 0
|
||||
@@ -81,7 +98,6 @@ function UF:Update_PlayerFrame(frame, db)
|
||||
frame.colors = ElvUF.colors
|
||||
frame.Portrait = frame.Portrait or (db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D)
|
||||
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "LeftButtonUp", self.db.targetOnMouseDown and "RightButtonDown" or "RightButtonUp")
|
||||
|
||||
E:Size(frame, frame.UNIT_WIDTH, frame.UNIT_HEIGHT)
|
||||
E:Size(_G[frame:GetName().."Mover"], frame:GetWidth(), frame:GetHeight())
|
||||
|
||||
@@ -107,8 +123,24 @@ function UF:Update_PlayerFrame(frame, db)
|
||||
|
||||
UF:Configure_Castbar(frame)
|
||||
|
||||
UF:Configure_ClassBar(frame)
|
||||
|
||||
if db.combatfade and not frame:IsElementEnabled("CombatFade") then
|
||||
frame:EnableElement("CombatFade")
|
||||
elseif not db.combatfade and frame:IsElementEnabled("CombatFade") then
|
||||
frame:DisableElement("CombatFade")
|
||||
end
|
||||
|
||||
UF:Configure_DebuffHighlight(frame)
|
||||
|
||||
UF:Configure_RaidIcon(frame)
|
||||
|
||||
UF:Configure_PVPIcon(frame)
|
||||
|
||||
UF:Configure_RaidRoleIcons(frame)
|
||||
|
||||
UF:Configure_CustomTexts(frame)
|
||||
|
||||
E:SetMoverSnapOffset(frame:GetName().."Mover", -(12 + db.castbar.height))
|
||||
frame:UpdateAllElements("ElvUI_UpdateAllElements")
|
||||
end
|
||||
|
||||
@@ -4,6 +4,8 @@ local UF = E:GetModule("UnitFrames");
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
local _G = _G
|
||||
--WoW API / Variables
|
||||
local CreateFrame = CreateFrame
|
||||
|
||||
local ns = oUF
|
||||
local ElvUF = ns.oUF
|
||||
@@ -12,21 +14,31 @@ assert(ElvUF, "ElvUI was unable to locate oUF.")
|
||||
function UF:Construct_TargetFrame(frame)
|
||||
frame.Health = self:Construct_HealthBar(frame, true, true, "RIGHT")
|
||||
frame.Health.frequentUpdates = true
|
||||
|
||||
frame.Power = self:Construct_PowerBar(frame, true, true, "LEFT")
|
||||
frame.Power.frequentUpdates = true
|
||||
|
||||
frame.Name = self:Construct_NameText(frame)
|
||||
|
||||
frame.Portrait3D = self:Construct_Portrait(frame, "model")
|
||||
frame.Portrait2D = self:Construct_Portrait(frame, "texture")
|
||||
frame.Buffs = self:Construct_Buffs(frame)
|
||||
frame.Debuffs = self:Construct_Debuffs(frame)
|
||||
frame.RaidTargetIndicator = UF:Construct_RaidIcon(frame)
|
||||
frame.Castbar = self:Construct_Castbar(frame, L["Target Castbar"])
|
||||
frame.Castbar.SafeZone = nil
|
||||
frame.Castbar.LatencyTexture:Hide()
|
||||
frame.RaidTargetIndicator = self:Construct_RaidIcon(frame)
|
||||
|
||||
frame.ComboPointsHolder = CreateFrame("Frame", nil, frame)
|
||||
E:Point(frame.ComboPointsHolder, "BOTTOM", E.UIParent, "BOTTOM", 0, 200)
|
||||
frame.ComboPoints = self:Construct_Combobar(frame)
|
||||
|
||||
frame.DebuffHighlight = self:Construct_DebuffHighlight(frame)
|
||||
frame.GPS = self:Construct_GPS(frame)
|
||||
frame.InfoPanel = self:Construct_InfoPanel(frame)
|
||||
frame.MouseGlow = self:Construct_MouseGlow(frame)
|
||||
frame.TargetGlow = self:Construct_TargetGlow(frame)
|
||||
frame.AuraBars = self:Construct_AuraBarHeader(frame)
|
||||
frame.Range = self:Construct_Range(frame)
|
||||
frame.PvPIndicator = self:Construct_PvPIcon(frame)
|
||||
frame.customTexts = {}
|
||||
|
||||
E:Point(frame, "BOTTOMRIGHT", E.UIParent, "BOTTOM", 413, 68)
|
||||
E:CreateMover(frame, frame:GetName().."Mover", L["Target Frame"], nil, nil, nil, "ALL,SOLO")
|
||||
@@ -94,10 +106,24 @@ function UF:Update_TargetFrame(frame, db)
|
||||
UF:Configure_Auras(frame, "Buffs")
|
||||
UF:Configure_Auras(frame, "Debuffs")
|
||||
|
||||
UF:Configure_Castbar(frame)
|
||||
|
||||
UF:Configure_ComboPoints(frame)
|
||||
|
||||
UF:Configure_DebuffHighlight(frame)
|
||||
|
||||
UF:Configure_GPS(frame)
|
||||
|
||||
UF:Configure_RaidIcon(frame)
|
||||
|
||||
UF:Configure_AuraBars(frame)
|
||||
|
||||
UF:Configure_Range(frame)
|
||||
|
||||
UF:Configure_PVPIcon(frame)
|
||||
|
||||
UF:Configure_CustomTexts(frame)
|
||||
|
||||
E:SetMoverSnapOffset(frame:GetName().."Mover", -(12 + db.castbar.height))
|
||||
frame:UpdateAllElements("ElvUI_UpdateAllElements")
|
||||
end
|
||||
|
||||
@@ -16,13 +16,18 @@ function UF:Construct_TargetTargetFrame(frame)
|
||||
frame.Portrait3D = self:Construct_Portrait(frame, "model")
|
||||
frame.Portrait2D = self:Construct_Portrait(frame, "texture")
|
||||
frame.Buffs = self:Construct_Buffs(frame)
|
||||
frame.RaidTargetIndicator = self:Construct_RaidIcon(frame)
|
||||
frame.Debuffs = self:Construct_Debuffs(frame)
|
||||
frame.RaidTargetIndicator = UF:Construct_RaidIcon(frame)
|
||||
frame.Range = self:Construct_Range(frame)
|
||||
-- frame.ThreatIndicator = self:Construct_Threat(frame)
|
||||
frame.InfoPanel = self:Construct_InfoPanel(frame)
|
||||
frame.MouseGlow = self:Construct_MouseGlow(frame)
|
||||
frame.TargetGlow = self:Construct_TargetGlow(frame)
|
||||
frame.customTexts = {}
|
||||
|
||||
E:Point(frame, "BOTTOM", E.UIParent, "BOTTOM", 0, 75)
|
||||
E:CreateMover(frame, frame:GetName().."Mover", L["TargetTarget Frame"], nil, nil, nil, "ALL,SOLO")
|
||||
frame.unitframeType = "targettarget";
|
||||
frame.unitframeType = "targettarget"
|
||||
end
|
||||
|
||||
function UF:Update_TargetTargetFrame(frame, db)
|
||||
@@ -58,7 +63,6 @@ function UF:Update_TargetTargetFrame(frame, db)
|
||||
frame.colors = ElvUF.colors
|
||||
frame.Portrait = frame.Portrait or (db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D)
|
||||
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "LeftButtonUp", self.db.targetOnMouseDown and "RightButtonDown" or "RightButtonUp")
|
||||
frame:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
||||
E:Size(frame, frame.UNIT_WIDTH, frame.UNIT_HEIGHT)
|
||||
E:Size(_G[frame:GetName().."Mover"], frame:GetWidth(), frame:GetHeight())
|
||||
|
||||
@@ -72,13 +76,19 @@ function UF:Update_TargetTargetFrame(frame, db)
|
||||
|
||||
UF:Configure_Portrait(frame)
|
||||
|
||||
-- UF:Configure_Threat(frame)
|
||||
|
||||
UF:EnableDisable_Auras(frame)
|
||||
UF:Configure_Auras(frame, "Buffs")
|
||||
UF:Configure_Auras(frame, "Debuffs")
|
||||
|
||||
UF:Configure_Range(frame)
|
||||
|
||||
UF:Configure_RaidIcon(frame)
|
||||
|
||||
E:SetMoverSnapOffset(frame:GetName().."Mover", -(12 + self.db["units"].player.castbar.height))
|
||||
UF:Configure_CustomTexts(frame)
|
||||
|
||||
E:SetMoverSnapOffset(frame:GetName().."Mover", -(12 + self.db.units.player.castbar.height))
|
||||
frame:UpdateAllElements("ElvUI_UpdateAllElements")
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
local E, L, V, P, G = unpack(ElvUI)
|
||||
local UF = E:GetModule("UnitFrames")
|
||||
local E, L, V, P, G = unpack(ElvUI); --Import: Engine, Locales, PrivateDB, ProfileDB, GlobalDB
|
||||
local UF = E:GetModule("UnitFrames");
|
||||
|
||||
--Cache global variables
|
||||
--Lua functions
|
||||
local _G = _G
|
||||
|
||||
local ns = oUF
|
||||
@@ -24,7 +26,7 @@ function UF:Construct_TargetTargetTargetFrame(frame)
|
||||
frame.customTexts = {}
|
||||
|
||||
E:Point(frame, "BOTTOM", E.UIParent, "BOTTOM", 0, 160)
|
||||
E:CreateMover(frame, frame:GetName().."Mover", L["TargetTargetTarget Frame"], nil, nil, nil, "ALL,SOLO", nil, "unitframe,targettargettarget,generalGroup")
|
||||
E:CreateMover(frame, frame:GetName().."Mover", L["TargetTargetTarget Frame"], nil, nil, nil, "ALL,SOLO")
|
||||
frame.unitframeType = "targettargettarget"
|
||||
end
|
||||
|
||||
@@ -60,7 +62,7 @@ function UF:Update_TargetTargetTargetFrame(frame, db)
|
||||
|
||||
frame.colors = ElvUF.colors
|
||||
frame.Portrait = frame.Portrait or (db.portrait.style == "2D" and frame.Portrait2D or frame.Portrait3D)
|
||||
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "RightButtonDown" or "LeftButtonUp" or "RightButtonUp")
|
||||
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "LeftButtonUp", self.db.targetOnMouseDown and "RightButtonDown" or "RightButtonUp")
|
||||
E:Size(frame, frame.UNIT_WIDTH, frame.UNIT_HEIGHT)
|
||||
E:Size(_G[frame:GetName().."Mover"], frame:GetWidth(), frame:GetHeight())
|
||||
|
||||
@@ -84,7 +86,7 @@ function UF:Update_TargetTargetTargetFrame(frame, db)
|
||||
|
||||
UF:Configure_RaidIcon(frame)
|
||||
|
||||
-- UF:Configure_CustomTexts(frame)
|
||||
UF:Configure_CustomTexts(frame)
|
||||
|
||||
E:SetMoverSnapOffset(frame:GetName().."Mover", -(12 + self.db.units.player.castbar.height))
|
||||
frame:UpdateAllElements("ElvUI_UpdateAllElements")
|
||||
|
||||
Reference in New Issue
Block a user