Right-click on target menu
I have fixed the BlackList addon to work with WoW Classic. But I cannot get the drop down item when right clicking a player to not be grayed out. Looking for help. It correctly places the menu item under Other Options and names it correctly. But I am not sure why it is grayed out and not usable.
This is the code for the menu: function BlackList:AddMenuItems() UnitPopupButtons["AddtoBlacklist"] = { text = "BlackList", dist = 0 } --Insert it to the end -1 tinsert(UnitPopupMenus["PARTY"], (#UnitPopupMenus["PARTY"])-1, "AddtoBlacklist") tinsert(UnitPopupMenus["RAID_PLAYER"], (#UnitPopupMenus["RAID_PLAYER"])-1, "AddtoBlacklist") tinsert(UnitPopupMenus["PLAYER"], (#UnitPopupMenus["PLAYER"])-1, "AddtoBlacklist") tinsert(UnitPopupMenus["CHAT_ROSTER"], (#UnitPopupMenus["CHAT_ROSTER"])-1, "AddtoBlacklist") tinsert(UnitPopupMenus["FRIEND"], (#UnitPopupMenus["FRIEND"])-1, "AddtoBlacklist") hooksecurefunc("UnitPopup_OnClick", function() if (self.value == "AddtoBlacklist") then local dropdownMenu = _G["UIDROPDOWNMENU_INIT_MENU"] if(dropdownMenu.name ~= UnitName("player")) then BlackList:AddPlayer(dropdownMenu.name) end end end) end |
I have tried multiple ways to try to fix this, but no matter what I try that selection is always grayed out in the player/target dropdown menu when right-clicking their portrait.
|
How does the code that controls the disabled state for that menu look like?
Is there a function for enabling or disabling each choice that is not present for the blacklist choice? |
Quote:
local function blackListButton(self) |
All times are GMT -6. The time now is 06:12 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI