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...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

448 Part III ■ Advanced Addon TechniquesendUIDropDownMenu_AddButton(info, level)endendUIDropDownMenu_Initialize(ExplorerDropDown, initialize)UIDropDownMenu_SetWidth(ExplorerDropDown, 125)UIDropDownMenu_SetButtonWidth(ExplorerDropDown, 124)UIDropDownMenu_SetText(ExplorerDropDown, “<strong>World</strong> Explorer!“)First you create the dropdown frame as in the previous examples, <strong>and</strong>then query the achievements API to get the criteria <strong>for</strong> the ‘‘<strong>World</strong> Explorer’’achievement (which happens to be achievement ID 46). Each criteria <strong>of</strong> theselected achievement that is itself an achievement is tested to see if it toocontains subitems, <strong>and</strong> if so shows the arrow <strong>and</strong> sets the value attribute.Figure 23-12 shows the dropdown menu in action.Figure 23-12: <strong>World</strong> Explorer dropdown menu

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

Saved successfully!

Ooh no, something went wrong!