Skip to content

Instantly share code, notes, and snippets.

@RagedUnicorn
Last active May 10, 2022 21:59
Show Gist options
  • Save RagedUnicorn/501377e896ad851c5a4f4c6f9d9bba31 to your computer and use it in GitHub Desktop.
Save RagedUnicorn/501377e896ad851c5a4f4c6f9d9bba31 to your computer and use it in GitHub Desktop.
WoW Lua examples for working with texture coordinates
--[[
Remove borders from a spell/item icon
]]--
local texture = frame:CreateTexture("Texture_Name", "ARTWORK")
texture:SetTexCoord(0.07, 0.93, 0.07, 0.93)
texture:SetPoint("LEFT", frame, -40, 0)
texture:SetSize(40, 40)
--[[
Reduce icons to small bar (similar to retail frameplates debuffs)
]]--
local texture = frame:CreateTexture("Texture_Name", "ARTWORK")
texture:SetTexCoord(0.07, 0.93, .25, .75)
texture:SetPoint("LEFT", frame, -40, 0)
texture:SetSize(40, 40)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment