@@ -95,7 +95,9 @@ function BL:BelowMinimap_UpdateBar(_, container)
95
95
end
96
96
97
97
function BL :UIWidgetTemplateCaptureBar (widgetInfo , container )
98
- if container == _G .UIWidgetBelowMinimapContainerFrame then return end -- handled by ProcessWidget
98
+ if container == _G .UIWidgetBelowMinimapContainerFrame and container .ProcessWidget then
99
+ return -- handled by ProcessWidget hook instead
100
+ end
99
101
100
102
BL .BelowMinimap_UpdateBar (self , widgetInfo , container )
101
103
end
@@ -142,8 +144,9 @@ function BL:UpdateDurabilityScale()
142
144
end
143
145
144
146
function BL :HandleWidgets ()
147
+ local BelowMinimapContainer = _G .UIWidgetBelowMinimapContainerFrame
145
148
BL :BuildWidgetHolder (' TopCenterContainerHolder' , ' TopCenterContainerMover' , ' CENTER' , L [" TopCenterWidget" ], _G .UIWidgetTopCenterContainerFrame , ' TOP' , E .UIParent , ' TOP' , 0 , - 30 , 125 , 20 , ' ALL,WIDGETS' )
146
- BL :BuildWidgetHolder (' BelowMinimapContainerHolder' , ' BelowMinimapContainerMover' , ' CENTER' , L [" BelowMinimapWidget" ], _G . UIWidgetBelowMinimapContainerFrame , ' TOPRIGHT' , _G .Minimap , ' BOTTOMRIGHT' , 0 , - 16 , 150 , 30 , ' ALL,WIDGETS' )
149
+ BL :BuildWidgetHolder (' BelowMinimapContainerHolder' , ' BelowMinimapContainerMover' , ' CENTER' , L [" BelowMinimapWidget" ], BelowMinimapContainer , ' TOPRIGHT' , _G .Minimap , ' BOTTOMRIGHT' , 0 , - 16 , 150 , 30 , ' ALL,WIDGETS' )
147
150
BL :BuildWidgetHolder (nil , ' GMMover' , ' TOP' , L [" GM Ticket Frame" ], _G .TicketStatusFrame , ' TOPLEFT' , E .UIParent , ' TOPLEFT' , 250 , - 5 , nil , nil , ' ALL,GENERAL' )
148
151
149
152
if E .Retail then
@@ -155,9 +158,7 @@ function BL:HandleWidgets()
155
158
for _ , widget in pairs (_G .UIWidgetPowerBarContainerFrame .widgetFrames ) do
156
159
BL .UIWidgetTemplateStatusBar (widget )
157
160
end
158
- end
159
-
160
- if not E .Retail then
161
+ else
161
162
local duraWidth , duraHeight = _G .DurabilityFrame :GetSize ()
162
163
_G .DurabilityFrame :SetFrameStrata (' HIGH' )
163
164
@@ -170,6 +171,9 @@ function BL:HandleWidgets()
170
171
hooksecurefunc (_G .UIWidgetTemplateCaptureBarMixin , ' Setup' , BL .UIWidgetTemplateCaptureBar )
171
172
172
173
-- Below Minimap Widgets
173
- hooksecurefunc (_G .UIWidgetBelowMinimapContainerFrame , ' ProcessWidget' , BL .BelowMinimap_ProcessWidget )
174
- BL .BelowMinimap_ProcessWidget (_G .UIWidgetBelowMinimapContainerFrame ) -- finds any pre-existing capture bars
174
+ if BelowMinimapContainer .ProcessWidget then
175
+ hooksecurefunc (BelowMinimapContainer , ' ProcessWidget' , BL .BelowMinimap_ProcessWidget )
176
+ end
177
+
178
+ BL .BelowMinimap_ProcessWidget (BelowMinimapContainer ) -- finds any pre-existing capture bars
175
179
end
0 commit comments