thanks for the fast reply
i tried this, but
Lua Code:
hooksecurefunc("MountOptionsMenu_Init", function(self, level)
print("are we hooked yet?", self, level)
local info = UIDropDownMenu_CreateInfo();
info.text = "Extra Option"
info.func = function()
print("clicked")
end
UIDropDownMenu_AddButton(info, level)
end)
that doesn't seem to get called, and i believe the problem here is that this function only gets called in the Loading-Phase of Blizzard_Collections so if i hook into it after it's loaded my hook never gets called, but also hooking before Blizzard_Collections is loaded doesn't work because then it isn't defined yet ... i think
any ideas ? maybe i need to call it again after i hooked into it ...
aaaaand that worked
just tested it with this line just below the hook call:
Lua Code:
UIDropDownMenu_Initialize(MountJournal.mountOptionsMenu, MountOptionsMenu_Init, "MENU");
big thanks for your help !
edit: after some more testing and writing i came across an other problem,
using either
Lua Code:
hooksecurefunc(C_MountJournal, "SummonByID", function(mountID)
print("hooked on a feeling ...", mountID)
end)
or
Lua Code:
local orgMountUP = C_MountJournal.SummonByID;
C_MountJournal.SummonByID = function(...)
print("Mount Up !")
orgMountUP(...);
end
only works if i click the Button in the MountJournal-Panel, but not if i track it in my hotbars and click it there :/
also regardless if hooksecurefunc(...) works it is probably not what i want in this case, because i want to replace some functionality of SummonByID(0) and not just do stuff afterwards, which means i need to replace the call (at least when its called with 0 )