WoW API: GetNumMacroIcons

Revision as of 15:34, 29 December 2006 by WoWWiki>Starlightblunder (docs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

WoW API < GetNumMacroIcons

Returns the number of possible macro icons.

numIcons = GetNumMacroIcons();

Parameters

Returns

numIcons
Integer - Number of available macro icons.

Example

local numIcons, i = GetNumMacroIcons(); -- i will be nil, but we do not really care at this point.
for i=1,numIcons do
 DEFAULT_CHAT_FRAME:AddMessage(string.format("Icon %d: %s",i,GetMacroIconInfo(i)));
end

Result

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

Notes

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