WoW:API GetNumMacroIcons: Difference between revisions
Jump to navigation
Jump to search
(docs) |
('i' is inherently local already, don't confuse the reader) |
||
Line 8: | Line 8: | ||
==Example== | ==Example== | ||
local numIcons | local numIcons = GetNumMacroIcons() | ||
for i=1,numIcons do | for i=1,numIcons do | ||
DEFAULT_CHAT_FRAME:AddMessage(string.format("Icon %d: %s",i,GetMacroIconInfo(i))); | DEFAULT_CHAT_FRAME:AddMessage(string.format("Icon %d: %s",i,GetMacroIconInfo(i))); |
Revision as of 23:52, 13 October 2010
Returns the number of possible macro icons.
numIcons = GetNumMacroIcons();
Parameters
Returns
- numIcons
- Integer - Number of available macro icons.
Example
local numIcons = GetNumMacroIcons() 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.