Entry 3652
WoW Lua Texture Tiling
Submitted by anonymous
on April 26, 2010 at 6:59 p.m.
Language: Lua. Code size: 618 bytes.
local txLines = frame:CreateTexture(nil, "ARTWORK") -- Note the last argument, true -- I couldn't find this documented, but -- it's needed. Without the true argument, the tiling doesn't work txLines:SetTexture([[Interface\AddOns\MyAddon\images\diag-tile]], true) -- Set to the top/center of my frame, inset by 8 pixels txLines:SetPoint("TOP", frame, "TOP", 0, -8) txLines:SetHeight(32) -- Set the width to the width of my frame, inset by 8 pixels on each side txLines:SetWidth(frame:GetWidth() - 16) -- This is the tricky part. See my note below txLines:SetTexCoord(0,(frame:GetWidth() / 8), 0,4)
This snippet took 0.00 seconds to highlight.
Back to the Entry List or Home.