AtlasID

From Warcraft Wiki
Jump to navigation Jump to search

An atlas is a texture containing sub-textures (atlas members) to reduce overhead. They make it easier to get part of a texture instead of using tex coords.

Example

Texture:SetAtlas

Shows the Paladin class trial icon on the screen

-- create texture
local f = CreateFrame("Frame")
f:SetSize(1, 1)
f:SetPoint("CENTER")
f.tex = f:CreateTexture()
f.tex:SetPoint("CENTER")

-- set the atlas and use atlas size
f.tex:SetAtlas("ClassTrial-Paladin-Ring", true)
-- which is equivalent to setting a texture, size and tex coords
f.tex:SetTexture("Interface/Glues/AccountUpgrade/ClassTrialThanksFrame")
f.tex:SetSize(188, 188)
f.tex:SetTexCoord(0.186523, 0.370117, 0.339844, 0.523438)

This can be referenced in Helix/AtlasInfo.lua

["Interface/Glues/AccountUpgrade/ClassTrialThanksFrame"]={
	["ClassTrial-Paladin-Ring"]={188, 188, 0.186523, 0.370117, 0.339844, 0.523438, false, false},

CreateAtlasMarkup

Prints a shield into the chat window

print(CreateAtlasMarkup("roleicon-tiny-tank"), "roleicon-tiny-tank")
print(CreateAtlasMarkup("groupfinder-icon-role-large-tank", 16, 16), "groupfinder-icon-role-large-tank")

API CreateAtlasMarkup.png

Patch changes

See also

In-game

Out of game

References

Rygarius 2014-07-10. 6.0 UI Add-On Changes - Updated Aug 4.