WoW API: GetMacroIconInfo

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

WoW API < GetMacroIconInfo

Return information for a macro icon.

iconTexture = GetMacroIconInfo(iconIndex)

Parameters[edit]

Arguments[edit]

iconIndex
Integer - The Index of the macro icon (from 1 to GetNumMacroIcons()).

Returns[edit]

iconTexture
String - The path of the texture without extention

Example[edit]

local numIcons = GetNumMacroIcons();
local iconTexture = GetMacroIconInfo(1);
DEFAULT_CHAT_FRAME:AddMessage(iconTexture);

Result[edit]

Displays Interface\Icons\INV_Misc_QuestionMark in the default chat frame.

Notes[edit]

You need to call GetNumMacroIcons() at least once before calling GetMacroIconInfo(), or the function will only return empty strings.