WoW:API GetMacroIconInfo: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (formatting) |
||
Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | |||
Return information for a macro icon. | Return information for a macro icon. | ||
iconTexture = GetMacroIconInfo(iconIndex) | |||
==Parameters== | |||
== Arguments == | ===Arguments=== | ||
:;iconIndex : Integer - The Index of the macro icon (from 1 to [[API_GetNumMacroIcons|GetNumMacroIcons()]]). | |||
===Returns=== | |||
:; | :;iconTexture : String - The path of the texture without extention | ||
== Returns == | |||
:; | |||
:The path of the texture without extention | |||
== Example == | == Example == | ||
local | local numIcons = GetNumMacroIcons(); | ||
local iconTexture = GetMacroIconInfo(1); | |||
DEFAULT_CHAT_FRAME:AddMessage(iconTexture); | |||
===Result=== | |||
Displays ''Interface\Icons\INV_Misc_QuestionMark'' in the default chat frame. | |||
==Notes== | |||
You need to call [[API_GetNumMacroIcons|GetNumMacroIcons()]] at least once before calling GetMacroIconInfo(), or the function will only return empty strings. |
Revision as of 15:30, 29 December 2006
Return information for a macro icon.
iconTexture = GetMacroIconInfo(iconIndex)
Parameters
Arguments
- iconIndex
- Integer - The Index of the macro icon (from 1 to GetNumMacroIcons()).
Returns
- iconTexture
- String - The path of the texture without extention
Example
local numIcons = GetNumMacroIcons(); local iconTexture = GetMacroIconInfo(1); DEFAULT_CHAT_FRAME:AddMessage(iconTexture);
Result
Displays Interface\Icons\INV_Misc_QuestionMark in the default chat frame.
Notes
You need to call GetNumMacroIcons() at least once before calling GetMacroIconInfo(), or the function will only return empty strings.