WoW API: GetNumMacroIcons

Revision as of 04:46, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API GetNumMacroIcons to API GetNumMacroIcons without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

WoW API < GetNumMacroIcons

Returns the number of possible macro icons.

numIcons = GetNumMacroIcons();

ParametersEdit

ReturnsEdit

numIcons
Integer - Number of available macro icons.

ExampleEdit

local numIcons = GetNumMacroIcons()
for i=1,numIcons do
 DEFAULT_CHAT_FRAME:AddMessage(string.format("Icon %d: %s",i,GetMacroIconInfo(i)));
end

ResultEdit

Outputs the IDs and texture names for all available macro icons to the default chat frame.

NotesEdit

This function must be called before using GetMacroIconInfo(index) to retrieve texture information.