View Single Post
01-14-24, 02:34 PM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,894
Install BugGrabber and BugSack to help with debugging. They work together.

You should be getting an error
Code:
local testFrame = CreateFrame("Frame", testFrame, UIParent)
is fine

Code:
local testFrame.texture = testFrame:CreateTexture()
is not fine. This second local is trying to create a new testFrame variable and .texture is trying to assume it is already a table (which it isn't).

Use:
Code:
testFrame.texture = testFrame:CreateTexture()
The first testFrame is a table (because frames are tables) so this should work.

That and
Code:
testFrame.texture:SetColorTexture(1,0,0,0.5)
SetTexture sets the texture file (name on disk) or file ID and WoW colours are 0 to 1. SetColorTexture creates a solid texture and colours it in one step.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 01-14-24 at 02:53 PM.
  Reply With Quote