Help with an Icon and SetAtlas
In Skillet, the details frame shows the reagents for a recipe using the following XML template
Code:
<Frame name="SkilletItemTemplate" hidden="false" virtual="true"> Code:
texture = GetItemIcon(reagent.reagentID) Code:
Icon:SetAtlas(hasRequiredSkillRank and "tradeskills-icon-add" or "tradeskills-icon-locked", TextureKitConstants.UseAtlasSize); What do I need to add to (or change in) my template so that I can use SetAtlas as in the Blizzard code? |
In your code, Icon is a Button (SetNormalTexture). In Blizzards, it's a texture. With your button you could probably:
Code:
local IconTexture = Icon:GetNormalTexture() |
All of the Set...Texture methods have an equivalent Set...Atlas method so SetNormalAtlas should work as a direct substitution.
|
Quote:
Replace: Code:
local texture = GetItemIcon(itemID) Code:
icon:SetNormalAtlas(categorySkillRank >= oreagent.requiredSkillRank and "tradeskills-icon-add" or "tradeskills-icon-locked") |
All times are GMT -6. The time now is 06:02 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI