Hello.
I'm trying to do something... I think simple, which is to add a new option to the DropDownMenu that appears on the world map.
That button uses the Template "
WorldMapTrackingOptionsButtonTemplate", which uses the mixin "WorldMapTrackingOptionsButtonMixin".
This mixin has the method:
Code:
WorldMapTrackingOptionsButtonMixin:InitializeDropDown()
where they initialize the dropDownMenu, and the method:
Code:
function WorldMapTrackingOptionsButtonMixin:OnSelection(value, checked)
where they do whatever they have to do after toggling the options.
I was trying to do...
Code:
hooksecurefunc(WorldMapTrackingOptionsButtonMixin, "InitializeDropDown", function(self) here_add_my_new_option end)
but this doesn't work, because this method is invoked on the event "WorldMapTrackingOptionsButtonMixin:OnLoad()", which, if I'm not wrong, is invoked before my addon is even loaded (right?).
I know that with the last Map API I can add a new overlay to the map and insert my own button, but having this one I didn't want to overload the map with more stuff.
Ideas of how to achieve this?
Thanks!