oUF

99.9k Downloads

Remove certain focus menu entries

Haleth opened this issue ยท 2 comments

commented

Since the focus menu update a couple of categories got added which aren't really useful for oUF.

"Larger focus frame" toggle and a 'Move frame' sub menu which has lock/unlock and 'buffs on top'.

UnitPopupButtons["LARGE_FOCUS"] = { text = FULL_SIZE_FOCUS_FRAME_TEXT, dist = 0, checkable = 1, isNotRadio = 1 };
UnitPopupButtons["LOCK_FOCUS_FRAME"] = { text = LOCK_FOCUS_FRAME, dist = 0 };
UnitPopupButtons["UNLOCK_FOCUS_FRAME"] = { text = UNLOCK_FOCUS_FRAME, dist = 0 };
UnitPopupButtons["MOVE_FOCUS_FRAME"] = { text = MOVE_FRAME, dist = 0, nested = 1 };
UnitPopupButtons["FOCUS_FRAME_BUFFS_ON_TOP"] = { text = BUFFS_ON_TOP, dist = 0, checkable = 1, isNotRadio = 1 };
commented

Actually I'm not sure it'll work. Tried it like this:

for _, menu in pairs(UnitPopupMenus) do
    for index = #menu, 1, -1 do
        if
            menu[index] == 'LARGE_FOCUS' or
            menu[index] == 'LOCK_FOCUS_FRAME' or
            menu[index] == 'UNLOCK_FOCUS_FRAME' or
            menu[index] == 'MOVE_FOCUS_FRAME' or
            menu[index] == 'FOCUS_FRAME_BUFFS_ON_TOP'
        then
            table.remove(menu, index)
        end
    end
end

And I got the taint popup when clicking Set Focus, again.

commented

I don't think we can do much about this. :(