Thread: API Changes
View Single Post
08-05-14, 07:13 AM   #6
Tageshi
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 7
GetMacroIcons

GetMacroIcons(table) will (sometimes?) populate numbers in the table instead of string for texture file path.
And we need to use texture:SetToFileData() for numbers instead of texture:SetTexture() like below:
Code:
texture = GetSpellorMacroIconInfo(index);
if(type(texture) == "number") then
	macroPopupIcon:SetToFileData(texture);
else
	macroPopupIcon:SetTexture("INTERFACE\\ICONS\\"..texture);
end
Where GetSpellorMacroIconInfo is returning values populated by GetMacroIcons()