Hello,
I'm using a popup menu based on UIDropDownMenuTemplate like this:
Lua Code:
local popupMenuHiddenFrame = CreateFrame("Frame", "hiddenPopupFrame", nil, "UIDropDownMenuTemplate")
popupTitleBtn:SetScript("OnMouseUp", function(self, mouse)
if (mouse == "LeftButton") then ToggleDropDownMenu(1, nil, popupMenuHiddenFrame, btnName, -20, 1) end
end)
UIDropDownMenu_Initialize(popupMenuHiddenFrame, popupMenuInitialize, "MENU")
It work fine but I would like to pass an argument to my popupMenuInitialize() function, in order to display a
dynamic title in the menu, like described in this picture (string "Ygramul" is what I need):
Found at:
https://wow.gamepedia.com/Using_UIDropDownMenu
Of course, I understand how to create a static title in the menu but I'm unable to pass the needed string to make this title dynamic. I don't need submenus, all my menu items are at the same level.