lua & xml
 Posted: Sat Jan 02, 2016 11:19 am
Posted: Sat Jan 02, 2016 11:19 amneed some help creating a frame and if i understand things correct i must create the frame in xml and call for the frame in lua.
there is something im missing in the code but i dont know what it is..
*.lua coding
*.xml coding
			there is something im missing in the code but i dont know what it is..
*.lua coding
- Code: Select all
- local f = CreateFrame("customframe",nil,UIParent)
 f:SetFrameStrata("BACKGROUND")
 f:SetWidth(128)
 f:SetHeight(64)
 local t = f:CreateTexture(nil,"BACKGROUND")
 t:SetTexture("blablabla.tga")
 t:SetAllPoints(f)
 f.texture = t
 f:SetPoint("CENTER",0,0)
 f:Show()
 end
*.xml coding
- Code: Select all
- <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="luapath.lua"/>
 <Frame name="customframe">
 <Anchors>
 <Anchor point="CENTER"/>
 </Anchors>
 <Frames>
 <Frame name="customframe">
 <Anchors>
 <Anchor point="CENTER"/>
 </Anchors>
 </Frame>
 </Frames>
 </Frame>
 </Ui>

