Skip to content

Commit 6388f24

Browse files
committed
Merge branch 'main' into ptr
2 parents fbfff28 + 724fdd9 commit 6388f24

File tree

4 files changed

+64
-29
lines changed

4 files changed

+64
-29
lines changed

ElvUI/Core/Defaults/Profile.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ P.nameplates = {
956956
},
957957
friendlyEnabled = false,
958958
friendly = {
959-
party = true,
959+
party = false,
960960
raid = false,
961961
arena = true,
962962
pvp = false,

ElvUI/Core/Modules/Blizzard/WidgetsUI.lua

+55-23
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ local BL = E:GetModule('Blizzard')
33
local NP = E:GetModule('NamePlates')
44

55
local _G = _G
6+
local next = next
67
local pairs = pairs
78
local strmatch = strmatch
89
local CreateFrame = CreateFrame
@@ -23,6 +24,14 @@ function BL:UIWidgetTemplateStatusBar()
2324
return -- we don't want to handle these widgets
2425
end
2526

27+
bar.BGLeft:SetAlpha(0)
28+
bar.BGRight:SetAlpha(0)
29+
bar.BGCenter:SetAlpha(0)
30+
bar.BorderLeft:SetAlpha(0)
31+
bar.BorderRight:SetAlpha(0)
32+
bar.BorderCenter:SetAlpha(0)
33+
bar.Spark:SetAlpha(0)
34+
2635
if not bar.backdrop then
2736
bar:CreateBackdrop('Transparent')
2837

@@ -38,55 +47,74 @@ function BL:UIWidgetTemplateStatusBar()
3847
if bar.Label then -- percent text
3948
bar.Label:FontTemplate(nil, nil, 'SHADOW')
4049
end
41-
42-
bar.BGLeft:SetAlpha(0)
43-
bar.BGRight:SetAlpha(0)
44-
bar.BGCenter:SetAlpha(0)
45-
bar.BorderLeft:SetAlpha(0)
46-
bar.BorderRight:SetAlpha(0)
47-
bar.BorderCenter:SetAlpha(0)
48-
bar.Spark:SetAlpha(0)
4950
end
5051
end
5152

52-
local function PVPCaptureBar(self)
53+
function BL:BelowMinimap_CaptureBar()
5354
self.LeftLine:SetAlpha(0)
5455
self.RightLine:SetAlpha(0)
5556
self.BarBackground:SetAlpha(0)
57+
self.SparkNeutral:SetAlpha(0)
58+
59+
self.GlowPulseAnim:Stop()
5660
self.Glow1:SetAlpha(0)
5761
self.Glow2:SetAlpha(0)
5862
self.Glow3:SetAlpha(0)
5963

60-
self.LeftBar:SetTexture(E.media.normTex)
61-
self.RightBar:SetTexture(E.media.normTex)
62-
self.NeutralBar:SetTexture(E.media.normTex)
63-
6464
self.LeftBar:SetVertexColor(0.2, 0.6, 1.0)
6565
self.RightBar:SetVertexColor(0.9, 0.2, 0.2)
6666
self.NeutralBar:SetVertexColor(0.8, 0.8, 0.8)
6767

68-
if not self.backdrop then
69-
local x = E.PixelMode and 1 or 2
68+
self.LeftBar:SetTexture(E.media.normTex)
69+
self.RightBar:SetTexture(E.media.normTex)
70+
self.NeutralBar:SetTexture(E.media.normTex)
7071

72+
if not self.backdrop then
7173
self:CreateBackdrop()
74+
75+
local x = E.PixelMode and 1 or 2
7276
self.backdrop:Point('TOPLEFT', self.LeftBar, -x, x)
7377
self.backdrop:Point('BOTTOMRIGHT', self.RightBar, x, -x)
78+
else
79+
self.backdrop:SetFrameLevel(self:GetFrameLevel() - 1)
7480
end
7581
end
7682

77-
local function EmberCourtCaptureBar() end
83+
function BL:BelowMinimap_EmberCourt() end
84+
7885
local captureBarSkins = {
79-
[2] = PVPCaptureBar,
80-
[252] = EmberCourtCaptureBar
86+
[2] = BL.BelowMinimap_CaptureBar,
87+
[252] = BL.BelowMinimap_EmberCourt
8188
}
8289

83-
function BL:UIWidgetTemplateCaptureBar(_, widget)
84-
if self:IsForbidden() or not widget then return end
90+
function BL:BelowMinimap_UpdateBar(_, container)
91+
if self:IsForbidden() or not container then return end
8592

86-
local skinFunc = captureBarSkins[widget.widgetSetID]
93+
local skinFunc = captureBarSkins[container.widgetSetID]
8794
if skinFunc then skinFunc(self) end
8895
end
8996

97+
function BL:UIWidgetTemplateCaptureBar(widgetInfo, container)
98+
if container == _G.UIWidgetBelowMinimapContainerFrame then return end -- handled by ProcessWidget
99+
100+
BL.BelowMinimap_UpdateBar(self, widgetInfo, container)
101+
end
102+
103+
function BL:BelowMinimap_ProcessWidget(widgetID)
104+
if not self or not self.widgetFrames then return end
105+
106+
if widgetID then
107+
local bar = self.widgetFrames[widgetID]
108+
if bar then -- excuse me?
109+
BL.BelowMinimap_UpdateBar(bar, nil, self)
110+
end
111+
else -- we reloading?
112+
for _, bar in next, self.widgetFrames do
113+
BL.BelowMinimap_UpdateBar(bar, nil, self)
114+
end
115+
end
116+
end
117+
90118
local function UpdatePosition(frame, _, anchor)
91119
local holder = frame.containerHolder
92120
if holder and anchor ~= holder then
@@ -116,7 +144,6 @@ end
116144
function BL:HandleWidgets()
117145
BL:BuildWidgetHolder('TopCenterContainerHolder', 'TopCenterContainerMover', 'CENTER', L["TopCenterWidget"], _G.UIWidgetTopCenterContainerFrame, 'TOP', E.UIParent, 'TOP', 0, -30, 125, 20, 'ALL,WIDGETS')
118146
BL:BuildWidgetHolder('BelowMinimapContainerHolder', 'BelowMinimapContainerMover', 'CENTER', L["BelowMinimapWidget"], _G.UIWidgetBelowMinimapContainerFrame, 'TOPRIGHT', _G.Minimap, 'BOTTOMRIGHT', 0, -16, 150, 30, 'ALL,WIDGETS')
119-
120147
BL:BuildWidgetHolder(nil, 'GMMover', 'TOP', L["GM Ticket Frame"], _G.TicketStatusFrame, 'TOPLEFT', E.UIParent, 'TOPLEFT', 250, -5, nil, nil, 'ALL,GENERAL')
121148

122149
if E.Retail then
@@ -131,13 +158,18 @@ function BL:HandleWidgets()
131158
end
132159

133160
if not E.Retail then
134-
_G.DurabilityFrame:SetFrameStrata('HIGH')
135161
local duraWidth, duraHeight = _G.DurabilityFrame:GetSize()
162+
_G.DurabilityFrame:SetFrameStrata('HIGH')
163+
136164
BL:BuildWidgetHolder('DurabilityFrameHolder', 'DurabilityFrameMover', 'CENTER', L["Durability Frame"], _G.DurabilityFrame, 'TOPRIGHT', E.UIParent, 'TOPRIGHT', -135, -300, duraWidth, duraHeight, 'ALL,GENERAL')
137165
BL:UpdateDurabilityScale()
138166
end
139167

140168
-- Credits ShestakUI
141169
hooksecurefunc(_G.UIWidgetTemplateStatusBarMixin, 'Setup', BL.UIWidgetTemplateStatusBar)
142170
hooksecurefunc(_G.UIWidgetTemplateCaptureBarMixin, 'Setup', BL.UIWidgetTemplateCaptureBar)
171+
172+
-- Below Minimap Widgets
173+
hooksecurefunc(_G.UIWidgetBelowMinimapContainerFrame, 'ProcessWidget', BL.BelowMinimap_ProcessWidget)
174+
BL.BelowMinimap_ProcessWidget(_G.UIWidgetBelowMinimapContainerFrame) -- finds any pre-existing capture bars
143175
end

ElvUI/Core/Modules/Chat/Chat.lua

+7-4
Original file line numberDiff line numberDiff line change
@@ -765,15 +765,18 @@ function CH:UpdateEditboxFont(chatFrame)
765765
end
766766

767767
local id = chatFrame:GetID()
768-
local font = LSM:Fetch('font', CH.db.font)
768+
local font, outline = LSM:Fetch('font', CH.db.font), CH.db.fontOutline
769769
local _, fontSize = _G.FCF_GetChatWindowInfo(id)
770770

771771
local editbox = _G.ChatEdit_ChooseBoxForSend(chatFrame)
772-
editbox:FontTemplate(font, fontSize, 'SHADOW')
773-
editbox.header:FontTemplate(font, fontSize, 'SHADOW')
772+
editbox:FontTemplate(font, fontSize, outline)
773+
774+
if editbox.header then
775+
editbox.header:FontTemplate(font, fontSize, outline)
776+
end
774777

775778
if editbox.characterCount then
776-
editbox.characterCount:FontTemplate(font, fontSize, 'SHADOW')
779+
editbox.characterCount:FontTemplate(font, fontSize, outline)
777780
end
778781

779782
-- the header and text will not update the placement without focus

ElvUI_Options/Core/Nameplates.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ NamePlates.generalGroup.args.enviromentConditions = ACH:Group(L["Enviroment Cond
449449
NamePlates.generalGroup.args.enviromentConditions.args.enemyEnabled = ACH:Toggle(E.NewSign..L["Enemy Enabled"], L["This option controls whether nameplates will follow the visibility settings below.\n|cffFF3333Warning:|r This will be overridden by the Enemy Combat Toggle."], 10, nil, nil, 250)
450450
NamePlates.generalGroup.args.enviromentConditions.args.enemy = ACH:MultiSelect(L["Enemy"], nil, 11, envConditions, nil, nil, function(_, key) return E.db.nameplates.enviromentConditions.enemy[key] end, function(_, key, value) E.db.nameplates.enviromentConditions.enemy[key] = value NP:EnviromentConditionals() end, nil, function() return not E.db.nameplates.enviromentConditions.enemyEnabled end)
451451
NamePlates.generalGroup.args.enviromentConditions.args.friendlyEnabled = ACH:Toggle(E.NewSign..L["Friendly Enabled"], L["This option controls whether nameplates will follow the visibility settings below.\n|cffFF3333Warning:|r This will be overridden by the Friendly Combat Toggle."], 20, nil, nil, 250)
452-
NamePlates.generalGroup.args.enviromentConditions.args.friendly = ACH:MultiSelect(L["Friendly"], nil, 21, envConditions, nil, nil, function(_, key) return E.db.nameplates.enviromentConditions.friendly[key] end, function(_, key, value) E.db.nameplates.visibility.enviromentConditions.friendly[key] = value NP:EnviromentConditionals() end, nil, function() return not E.db.nameplates.enviromentConditions.friendlyEnabled end)
452+
NamePlates.generalGroup.args.enviromentConditions.args.friendly = ACH:MultiSelect(L["Friendly"], nil, 21, envConditions, nil, nil, function(_, key) return E.db.nameplates.enviromentConditions.friendly[key] end, function(_, key, value) E.db.nameplates.enviromentConditions.friendly[key] = value NP:EnviromentConditionals() end, nil, function() return not E.db.nameplates.enviromentConditions.friendlyEnabled end)
453453
NamePlates.generalGroup.args.enviromentConditions.args.stackingEnabled = ACH:Toggle(E.NewSign..L["Stacking Enabled"], L["This option controls whether nameplates will follow the settings below.\n|cffFF3333Warning:|r This is an override to the Motion Type setting."], 30, nil, nil, 250)
454454
NamePlates.generalGroup.args.enviromentConditions.args.stacking = ACH:MultiSelect(L["Stacking Plates"], nil, 31, envConditions, nil, nil, function(_, key) return E.db.nameplates.enviromentConditions.stackingNameplates[key] end, function(_, key, value) E.db.nameplates.enviromentConditions.stackingNameplates[key] = value NP:EnviromentConditionals() end, nil, function() return not E.db.nameplates.enviromentConditions.stackingEnabled end)
455455

0 commit comments

Comments
 (0)