View Single Post
02-18-21, 06:10 AM   #1
nemvokrobot
A Murloc Raider
Join Date: Feb 2021
Posts: 6
Simple texture draw not working

Hello I have this frame created:

Code:
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
    <Script file="testtext.lua"/>
    <Frame name="TestText" frameStrata="FULLSCREEN" hidden="true" setAllPoints="true">
        <Scripts>
            <OnLoad>
                self:RegisterEvent("PLAYER_ENTERING_WORLD");
            </OnLoad>
            <OnEvent function="Testtex_OnEvent"/>
        </Scripts>
    </Frame>
</Ui>
and I want to just show a texture in the center of the screen. My testtex.lua file:

Code:
function Testtex_OnEvent(self, event)
	if event == "PLAYER_ENTERING_WORLD" then
		self.texture = self:CreateTexture("texture", "ARTWORK");
		self.texture:SetPoint("CENTER");
		self.texture:SetSize(32,32);
		self.texture:SetTexture("Interface\Icons\INV_Misc_EngGizmos_17");
		self:Show();
	end	
end
Would be really thankful if you could help me out.

Last edited by nemvokrobot : 02-18-21 at 06:18 AM.
  Reply With Quote