Hi guys!
Ive googled lots of examples on how to create a Frame that contains a texture in xml, then calling it for when i want it to be shown in the lua.
Im using Addon Studio and got the mp3 files to play, but at the same time i want to show a picture for about 5 seconds.
Heres my xml:
Code:
<Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.blizzard.com/wow/ui/">
<Texture name="Texture1" file="Interface\AddOns\Consuela\consuela.png">
<Size>
<AbsDimension x="127" y="136" />
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset x="567" y="-3" />
</Anchor>
</Anchors>
</Texture>
</Ui>
And heres the lua:
Code:
local frame = CreateFrame("FRAME", "combatAddonFrame");
frame:RegisterEvent("PLAYER_REGEN_DISABLED");
local function eventHandler(self, event, ...)
PlaySoundFile("Interface\\AddOns\\Consuela\\comeget.mp3");
end
frame:SetScript("OnEvent", eventHandler);
local frame = CreateFrame("FRAME", "deathAddonFrame");
frame:RegisterEvent("PLAYER_DEAD");
local function eventHandler(self, event, ...)
PlaySoundFile("Interface\\AddOns\\Consuela\\pledge.mp3");
end
frame:SetScript("OnEvent", eventHandler);
Ive tried to call the Texture1:Show() which should show the texture defined in the xml file?
Any tips?