mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
ClassicAPI_ToggleUnitMenu's initialize closure ran the same level-1 customization at every level. When the mouse crossed a nested entry (Loot Method / Loot Threshold / Raid Target Icon) the menu builds its level-2 submenu and re-invokes initialize; our AddFocusButton / AddCancelButton call UIDropDownMenu_AddButton with no level, which defaults to level 1 (not the current level), appending onto the still- open level-1 list. Level 1 is not reset while a submenu rebuilds, so the list grew every hover until "Too many buttons in UIDropDownMenu: ClassicAPIUnitMenuDropDown", pushing the real entries out of reach. Make initialize level-aware: at level >= 2 hand off to UnitPopup_ShowMenu (it resolves the submenu from UIDROPDOWNMENU_MENU_VALUE and adds its own Cancel); do the scratch-copy + Focus/Cancel append only at level 1 - mirroring how Blizzard's own unit dropdowns init.