[SOLVED]Using Icon and Tcoord in a DropDown menu

I’m trying to put class icons in the icon of dropdown menu items. So far, I’m getting the full atlas (all icons shown in micro format) and can’t seem to get the .tcoord right. Here’s the code in question:

> classIcons =
> {
>   ["Warrior"]=	"|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:0:64:0:64|t",
>   ["Mage"]=		"|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:64:128:0:64|t",
>   ["Rogue"]=	"|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:128:196:0:64|t",
>   ["Druid"]=	"|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:196:256:0:64|t",
>   ["Hunter"]=	"|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:0:64:64:128|t",
>   ["Shaman"]=	"|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:64:128:64:128|t",
>   ["Priest"]=	"|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:128:196:64:128|t",
>   ["Warlock"]=	"|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:196:256:64:128|t",
>   ["Paladin"]=	"|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:0:64:128:196|t",
>  }

rowInfo.icon ="Interface\\GLUES\\CHARACTERCREATE\\UI-CHARACTERCREATE-CLASSES";
rowInfo.tcoord = unpack(CLASS_ICON_TCOORDS["WARLOCK"]);
UIDropDownMenu_AddButton(rowInfo);

When I try printing the unpack tcoord, each value is set to 0.75. Is there something else I have to do to rowInfo.tcoord? Or some other value that needs to be set in order to select just the single class icon from the atlas?

Thanks,

Edit:
OK, figured it out. I misread how tcoords are passed into the rowInfo. There are 4 separate coord variables that have to be set. Correct code is:

rowInfo.tCoordLeft, rowInfo.tCoordRight, rowInfo.tCoordTop, rowInfo.tCoordBottom = unpack(CLASS_ICON_TCOORDS["WARLOCK:]);

Or you could use what you have in the table as part of a FontString text:

classIcons = {
	["Warrior"] = "|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:0:64:0:64|t",
	["Mage"] = "|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:64:128:0:64|t",
	["Rogue"] = "|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:128:196:0:64|t",
	["Druid"] = "|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:196:256:0:64|t",
	["Hunter"] = "|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:0:64:64:128|t",
	["Shaman"] = "|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:64:128:64:128|t",
	["Priest"] = "|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:128:196:64:128|t",
	["Warlock"] = "|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:196:256:64:128|t",
	["Paladin"] = "|TInterface\\WorldStateFrame\\ICONS-CLASSES:0:0:0:0:256:256:0:64:128:196|t",
}
someFontString:SetText(classIcons.Warlock .. " Warlock")

That’s a good idea. I will consider that as well. Thanks!