View Single Post
09-26-09, 11:20 PM   #10
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
You aren't keeping the frame and texture components properly seperated. You only need one frame but two textures (no point creating a seperate frame for each texture).

Code:
local aggro = CreateFrame("Frame", "GrimUIArtAggro", UIParent) 
aggro:SetPoint("BOTTOMLEFT")
aggro:SetPoint("BOTTOMRIGHT")
aggro:SetFrameStrata("LOW") 
aggro:SetFrameLevel(2) 
aggro:SetAlpha(0.5) 
aggro:Hide()

aggro.L = aggro:CreateTexture("GrimUIArtAggroL", 'LOW')
aggro.L:SetPoint("BOTTOMLEFT")
aggro.L:SetTexture("Interface\\AddOns\\!GrimUI\\Art\\Aggro")
aggro.L:SetHeight(170)
aggro.L:SetWidth(285)

aggro.R = aggro:CreateTexture("GrimUIArtAggroR", 'LOW')
aggro.R:SetPoint("BOTTOMRIGHT")
aggro.R:SetTexture("Interface\\AddOns\\!GrimUI\\Art\\Aggro")
aggro.R:SetHeight(170)
aggro.R:SetWidth(285)
aggro.R:SetTexCoord(1, 0, 0, 1)
Edit: Bad cut-and-paste

Last edited by Vrul : 09-27-09 at 11:30 AM.
  Reply With Quote