@@ -84,12 +84,6 @@ function AB:ExtraButtons_BossAlpha(button)
84
84
end
85
85
end
86
86
87
- function AB :ExtraButtons_BossParent (parent )
88
- if parent ~= ExtraActionBarHolder and not AB .NeedsReparentExtraButtons then
89
- AB :ExtraButtons_Reparent ()
90
- end
91
- end
92
-
93
87
function AB :ExtraButtons_ZoneAlpha ()
94
88
local zoneAlpha = E .db .actionbar .zoneActionButton .alpha
95
89
_G .ZoneAbilityFrame .Style :SetAlpha (not E .db .actionbar .zoneActionButton .clean and zoneAlpha or 0 )
@@ -168,6 +162,12 @@ function AB:ExtraButtons_ZoneScale()
168
162
end
169
163
end
170
164
165
+ function AB :ExtraButtons_BossParent (parent )
166
+ if parent ~= ExtraActionBarHolder and not AB .NeedsReparentExtraButtons then
167
+ AB :ExtraButtons_Reparent ()
168
+ end
169
+ end
170
+
171
171
function AB :ExtraButtons_ZoneParent (parent )
172
172
if parent ~= ZoneAbilityHolder and not AB .NeedsReparentExtraButtons then
173
173
AB :ExtraButtons_Reparent ()
@@ -192,7 +192,7 @@ function AB:ExtraButtons_Reparent()
192
192
end
193
193
end
194
194
195
- function AB :HandleExtraButton ()
195
+ function AB :ExtraButtons_SetupBoss ()
196
196
local ExtraActionBarFrame = _G .ExtraActionBarFrame
197
197
if not ExtraActionBarFrame then return end
198
198
@@ -207,7 +207,7 @@ function AB:HandleExtraButton()
207
207
ExtraActionBarFrame .ignoreInLayout = true
208
208
end
209
209
210
- function AB :HandleZoneAbility ()
210
+ function AB :ExtraButtons_SetupZone ()
211
211
local ZoneAbilityFrame = _G .ZoneAbilityFrame
212
212
if not ZoneAbilityFrame then return end
213
213
@@ -232,7 +232,7 @@ function AB:HandleZoneAbility()
232
232
end
233
233
end
234
234
235
- function AB :HandleExtraAbility ()
235
+ function AB :ExtraButtons_SetupAbility ()
236
236
local ExtraAbilityContainer = _G .ExtraAbilityContainer
237
237
if not ExtraAbilityContainer then return end
238
238
@@ -252,36 +252,29 @@ end
252
252
253
253
function AB :CreateExtraHolders ()
254
254
if not ExtraActionBarHolder then
255
- ExtraActionBarHolder = CreateFrame (' Frame' , nil , E .UIParent )
255
+ ExtraActionBarHolder = CreateFrame (' Frame' , ' ElvUI_ExtraActionBarHolder ' , E .UIParent )
256
256
ExtraActionBarHolder :Point (' BOTTOM' , E .UIParent , ' BOTTOM' , - 150 , 300 )
257
257
E .FrameLocks [ExtraActionBarHolder ] = true
258
258
259
259
E :CreateMover (ExtraActionBarHolder , ' BossButton' , L [" Boss Button" ], nil , nil , nil , ' ALL,ACTIONBARS' , nil , ' actionbar,extraButtons,extraActionButton' )
260
260
end
261
261
262
262
if not ZoneAbilityHolder then
263
- ZoneAbilityHolder = CreateFrame (' Frame' , nil , E .UIParent )
263
+ ZoneAbilityHolder = CreateFrame (' Frame' , ' ElvUI_ZoneAbilityHolder ' , E .UIParent )
264
264
ZoneAbilityHolder :Point (' BOTTOM' , E .UIParent , ' BOTTOM' , 150 , 300 )
265
265
E .FrameLocks [ZoneAbilityHolder ] = true
266
266
267
267
E :CreateMover (ZoneAbilityHolder , ' ZoneAbility' , L [" Zone Ability" ], nil , nil , nil , ' ALL,ACTIONBARS' , nil , ' actionbar,extraButtons,extraActionButton' )
268
268
end
269
269
end
270
270
271
- function AB :SetupExtraButton ()
272
- AB :CreateExtraHolders ()
273
-
274
- if _G .ZoneAbilityFrame then
275
- AB :HandleZoneAbility ()
276
- end
277
-
278
- if _G .ExtraAbilityContainer then
279
- AB :HandleExtraAbility ()
280
- end
281
-
282
- AB :HandleExtraButton ()
283
- AB :UpdateExtraButtons ()
284
- AB :ExtraButtons_Reparent ()
271
+ function AB :SetupExtraButtons ()
272
+ AB :CreateExtraHolders () -- make the holders
273
+ AB :ExtraButtons_Reparent () -- reparent to the holders (keep before setup)
274
+ AB :ExtraButtons_SetupBoss () -- attach boss
275
+ AB :ExtraButtons_SetupZone () -- attach zone
276
+ AB :ExtraButtons_SetupAbility () -- attach abilities
277
+ AB :UpdateExtraButtons () -- update the settings
285
278
end
286
279
287
280
function AB :UpdateExtraButtons ()
0 commit comments