Hi Guys -
We've added the ability to import/include files into the skin markup files, the idea being to move all the common markup into smaller and easier to manage files in the hope that we can minimize the amount of work skinners are required to do to offer new skins and to make it easier for the maintainers to do their job.
The syntax is pretty straightforward, the following would be a typical example of how this new feature could be used:
In order to realize the full benefits from import/include files we also had to add the <define> tag. The tag allows a basic form of parameter to be used so that the imported files can be as generic as possible. A define tag's value is a simple name - value pairing:
Any occurance of the token represented by the define's name will be replaced with the appropriate value in any imported markup.
The following is an example of how an imported file could look:
These new features are not in the 0.1.3.0 release but will be available in the next CVS build or two.
Cheers,
Smirnoff.
We've added the ability to import/include files into the skin markup files, the idea being to move all the common markup into smaller and easier to manage files in the hope that we can minimize the amount of work skinners are required to do to offer new skins and to make it easier for the maintainers to do their job.
The syntax is pretty straightforward, the following would be a typical example of how this new feature could be used:
Code:
<window>
<id>6</id>
<defaultcontrol>2</defaultcontrol>
<allowoverlay>yes</allowoverlay>
<define>#header.label:134</define>
<define>#header.image:videos_logo.png</define>
<define>#header.hover:hover_my videos.png</define>
<controls>
<import>common.window.xml</import>
<control>
<type>group</type>
<description>group element</description>
<animation>FlyInFromLeft</animation>
<control>
<description>View-As button</description>
<type>button</type>
<id>2</id>
<posX>60</posX>
<posY>97</posY>
<label>100</label>
</control>
...
...
...
</window>
In order to realize the full benefits from import/include files we also had to add the <define> tag. The tag allows a basic form of parameter to be used so that the imported files can be as generic as possible. A define tag's value is a simple name - value pairing:
Code:
<define>name:value</define>
<define>#header.label:No name</define>
<define>#header.label:34</define>
Any occurance of the token represented by the define's name will be replaced with the appropriate value in any imported markup.
The following is an example of how an imported file could look:
Code:
<window>
<controls>
<control>
<description>BG</description>
<type>image</type>
<id>1</id>
<posX>0</posX>
<posY>0</posY>
<width>720</width>
<height>576</height>
<texture>background.png</texture>
</control>
<control>
<type>image</type>
<id>1</id>
<posX>60</posX>
<posY>20</posY>
<texture>#header.image</texture>
</control>
<control>
<type>label</type>
<id>1</id>
<posX>250</posX>
<posY>70</posY>
<label>#header.label</label>
<font>font16</font>
<align>right</align>
<textcolor>ffffffff</textcolor>
</control>
<control>
<description>Number of Files Label</description>
<type>label</type>
<id>1</id>
<posX>260</posX>
<posY>530</posY>
<label>#itemcount</label>
<align>left</align>
<textcolor>ffffffff</textcolor>
</control>
<control>
<description>Selected item Label</description>
<type>fadelabel</type>
<id>1</id>
<posX>660</posX>
<posY>70</posY>
<width>400</width>
<label>#selecteditem</label>
<font>font14</font>
<align>right</align>
<textcolor>ffffffff</textcolor>
</control>
<control>
<type>image</type>
<id>1</id>
<posX>75</posX>
<posY>370</posY>
<texture>#header.hover</texture>
</control>
</controls>
</window>
These new features are not in the 0.1.3.0 release but will be available in the next CVS build or two.
Cheers,
Smirnoff.