Hook mixin or override template - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-09-18, 04:15 AM   #1
A Cyclonian
Join Date: Feb 2012
Posts: 49
Hook mixin or override template


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:
where they initialize the dropDownMenu, and the method:
function WorldMapTrackingOptionsButtonMixin:OnSelection(value, checked)
where they do whatever they have to do after toggling the options.

I was trying to do...
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?

  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Hook mixin or override template

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off