12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

432 Part III ■ Advanced Addon TechniquesFigure 23-1: Dropdown menu displayed when right-clicking on the player frameFigure 23-2: Column dropdown in the Who list panel3. Initializing the dropdown menu once it has been created.4. Writing code that causes a click on the button to toggle the display <strong>of</strong> thedropdown menu.For this example, you need to create a new addon called DropDownTest. Createthe basic addon skeleton including DropDownTest.toc, DropDownTest.lua,<strong>and</strong> DropDownTest.xml.Adding a Toggle ButtonUsing the Blizzard template GameMenuButtonTemplate, create a button byadding the following code to DropDownTest.xml:DropDownTest_ButtonOnClick(self, button, down)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!