WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Simple texture draw not working (https://www.wowinterface.com/forums/showthread.php?t=58592)

nemvokrobot 02-18-21 06:10 AM

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. :)

nemvokrobot 02-18-21 06:22 AM

Ah the issue caused by I haven't put double "\\" for the texture path lol


All times are GMT -6. The time now is 02:20 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI