-
Posted by gckearns on Sat, 21 May 2011 16:01:56
A part of my file which had worked until I added this template: `
<Frame name="PH_BlackbarTemp" parent="PH_ScreenRep_Red" virtual="true"> <Layers> <Layer level="ARTWORK"> <Texture> <Color r="0.0" g="0.0" b="0.0" a="1"/> </Texture> </Layer> </Layers> </Frame> <Frame name="PH_BlackbarTop" inherits="PH_BlackbarTemp"> <Size x="102" y="0"/> <Anchors> <Anchor point="TOP"/> </Frame>
` There are 4 frames total using the template with only name, anchor and size changing. I have a function that changes the size sucessfully, but I do not see my frame when using the template. I see it just fine when each frame is defined individually as such: `
<Frame name="PH_BlackbarTop" parent="PH_ScreenRep_Red"> <Size x="102" y="0"/> <Anchors> <Anchor point="TOP"/> </Anchors> <Layers> <Layer level="ARTWORK"> <Texture> <Color r="0.0" g="0.0" b="0.0" a="1"/> </Texture> </Layer> </Layers> <Scripts> <OnLoad>print(PH_BlackbarTop:GetSize())</OnLoad> </Scripts> </Frame>
`
What am I doing wrong?
I did some more reading and realized I was defining the template in the wrong portion of the XML file. Works just fine now!