Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-09-18, 04:15 AM   #1
maqjav
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Feb 2012
Posts: 60
Hook mixin or override template

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!
  Reply With Quote
 

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


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