I doubt chances are high that somebody can help me with a question this specific but here we go:
I'm working on a minimap replacement for my UI compilation with a button bin menu.
The goal is to move all the excess minimap buttons to the button bin menu. The submenu replaces the original right-click dropdown. It works in the current version but I had to copy the submenu logics from the original UI, for example: In dungeon = "Teleport out of dungeon", in queue = "Leave queue" and so on all due to the fact that I can't get the original dropdowns to work as a submenu.
http://www.friendpaste.com/FO01tjFi4cCKHTf4Xi3wG
As you can see the showDropDown() function totally bloats my code and is prone to changes of the original logics. All I want to do is check for level == 2 and UIDROPDOWNMENU_MENU_VALUE == "LFG" for example and then just pop up MiniMapLFGFrameDropDown as a child menu. The problem is that in
MiniMapLFGFrameDropDown_Update() the buttons are added with level = 1 (omitted parameter of UIDropDownMenu_AddButton) and consequently my main menu which also is level 1 will close when I show the original dropdown via ToggleDropDownMenu(nil, .....) inside my dropdown builder function and that really is a way to annoy me when I accidentally hit the voice menu for example when all I was going for is the LFG menu right beneath it. I can't scan the dropdown either because the data is generated when shown and that as I already mentioned closes my menu.
Any suggestions? Somebody who already came up with a solution for a similar scenario or knows an addon that reuses original UI dropdowns as submenus?