View Single Post
01-14-24, 01:08 PM   #1
TJones1467
A Defias Bandit
Join Date: Jan 2024
Posts: 2
New to Addons : Issue with SetTexture

I am new to LUA and creating addons, but I am not new to programming in general. I am working on an extremely simple addon to begin to figure things out. All I am trying to do at the moment is create a big red box in the middle of the game screen. Here is the code I have.

Code:
SLASH_RELOADUI1 = "/rl"
SlashCmdList.RELOADUI = ReloadUI

SLASH_FRAMESTK1 = "/fs"
SlashCmdList.FRAMESTK = function()
    LoadAddOn("Blizzard_DebugTools")
    FrameStackTooltip_Toggle()
end

local testFrame = CreateFrame("Frame", testFrame, UIParent)
testFrame:SetPoint("CENTER")
testFrame:SetSize(300,300)

local testFrame.texture = testFrame:CreateTexture()
testFrame.texture:SetAllPoints(testFrame)
testFrame.texture:SetTexture(255,0,0,0.5)
The first two slash commands are (probably obviously) just to help reload the UI and open the frame stack.

As far as I can tell, this should work. When I take a look at the frame stack, the frame is there but it isn't showing anything. I've included a link below to a screenshot of what I see with frame stack activated. I have bug grabber installed and it shows no errors.

https://www.dropbox.com/scl/fi/v9q5h...f5k11dnwa&dl=0

If anyone could point out what I am doing wrong here, I would greatly appreciate it.

Last edited by TJones1467 : 01-14-24 at 01:11 PM.
  Reply With Quote