WoWInterface (
-   oUF (Otravi Unit Frames) (
-   -   Can't change legacy raid with oUF Slim (

scrable 10-30-14 02:51 AM

Can't change legacy raid with oUF Slim
As you can see here, I can't change the legacy difficulty, as it is greyed out and unclickable. I've narrowed this down to oUF Slim, but I'm unsure of how to fix it. I know this addon has been out of date for a while but I've managed to keep it alive for myself. Naturally, this probably has to do with how the drop down menu is created, but I don't know enough lua to fix it myself. This is the current code which I assume handles the menu:

local dropdown = CreateFrame("Frame", "MyAddOnUnitDropDownMenu", UIParent, "UIDropDownMenuTemplate")
UIDropDownMenu_Initialize(dropdown, function(self)
        local unit = self:GetParent().unit
        if not unit then return end

        local menu, name, id
        if UnitIsUnit(unit, "player") then
                menu = "SELF"
        elseif UnitIsUnit(unit, "vehicle") then
                menu = "VEHICLE"
        elseif UnitIsUnit(unit, "pet") then
                menu = "PET"
        elseif UnitIsPlayer(unit) then
                id = UnitInRaid(unit)
                if id then
                        menu = "RAID_PLAYER"
                        name = GetRaidRosterInfo(id)
                elseif UnitInParty(unit) then
                        menu = "PARTY"
                        menu = "PLAYER"
                menu = "TARGET"
                name = RAID_TARGET_ICON
        if menu then
                UnitPopup_ShowMenu(self, menu, unit, name, id)
end, "MENU")

local menu = function(self)
        ToggleDropDownMenu(1, nil, dropdown, "cursor", 0, 0)

Any help with this would be greatly appreciated :)

Phanx 10-30-14 03:01 AM

You don't need any of that code anymore. Just delete it. Also, find where the layout sets the frame's type2 attribute to "menu" and delete that too. oUF already handles menus for you, by setting the type2 attribute to "togglemenu", which tells the default UI to select and show the proper menu for the frame's unit for you.

scrable 10-30-14 03:15 AM

Thank you for such a fast response and explanation. Got rid of the code mentioned and it works perfectly, thank you.

All times are GMT -6. The time now is 08:58 PM.

vBulletin © 2022, Jelsoft Enterprises Ltd
© 2004 - 2021 MMOUI