coa: dynamic PopulateListFrame buttons for 21 CoA custom classes
Closes the deferred UI piece from 32324ff. The 11 vanilla class buttons
in Dcr_lists.xml stay hardcoded so this fork keeps working on stock
clients with no CoA extras (DC.ClassNumToUName produces 0 entries at
idx >= 22 there, builder returns early).
D:BuildPopulateExtraClassButtons(frame) walks DC.ClassNumToUName for
keys 22+, sorted, and creates one GameMenuButtonTemplate per class:
- First extra fills row 6's empty right column (beside Hero)
- Remaining alternate left/right, chained off Hero / Deathknight
- Frame grows by ceil((n-1)/2) * 20 px so the existing BOTTOM-anchored
Close button slides down with it
Idempotent via frame.coa_extras_built.
Wired from DecursivePopulateListFrame OnShow with a Dcr.BuildPopulateExtraClassButtons
nil-guard so an out-of-order load doesn't break the frame.
Bumped toc to Asc-1.1.1-coa.
This commit is contained in:
@@ -440,6 +440,7 @@
|
||||
<Scripts>
|
||||
<OnShow>
|
||||
_G[self:GetName().."Title"]:SetText(Dcr.L["STR_QUICK_POP"]);
|
||||
if Dcr.BuildPopulateExtraClassButtons then Dcr:BuildPopulateExtraClassButtons(self); end
|
||||
</OnShow>
|
||||
</Scripts>
|
||||
<Layers>
|
||||
|
||||
Reference in New Issue
Block a user