home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Skins
Skinning engine improvements
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Smirnuff" data-source="post: 17603" data-attributes="member: 10545"><p>Hi Guys -</p><p></p><p>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.</p><p></p><p>The syntax is pretty straightforward, the following would be a typical example of how this new feature could be used:</p><p></p><p>[code]</p><p><window></p><p> <id>6</id></p><p> <defaultcontrol>2</defaultcontrol></p><p> <allowoverlay>yes</allowoverlay></p><p></p><p> </p><p> <define>#header.label:134</define></p><p> <define>#header.image:videos_logo.png</define></p><p> <define>#header.hover:hover_my videos.png</define></p><p></p><p> <controls></p><p></p><p> </p><p> <import>common.window.xml</import></p><p></p><p> <control></p><p> <type>group</type></p><p> <description>group element</description></p><p> <animation>FlyInFromLeft</animation></p><p> <control></p><p> <description>View-As button</description></p><p> <type>button</type></p><p> <id>2</id></p><p> <posX>60</posX></p><p> <posY>97</posY></p><p> <label>100</label></p><p> </control></p><p> ...</p><p> ...</p><p> ...</p><p></window></p><p></p><p>[/code]</p><p></p><p>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:</p><p></p><p>[code]</p><p><define>name:value</define></p><p></p><p><define>#header.label:No name</define></p><p><define>#header.label:34</define></p><p>[/code]</p><p></p><p>Any occurance of the token represented by the define's name will be replaced with the appropriate value in any imported markup.</p><p></p><p>The following is an example of how an imported file could look:</p><p></p><p>[code]</p><p><window></p><p> <controls></p><p> <control></p><p> <description>BG</description></p><p> <type>image</type></p><p> <id>1</id></p><p> <posX>0</posX></p><p> <posY>0</posY></p><p> <width>720</width></p><p> <height>576</height></p><p> <texture>background.png</texture></p><p> </control></p><p> <control></p><p> <type>image</type></p><p> <id>1</id></p><p> <posX>60</posX></p><p> <posY>20</posY></p><p> <texture>#header.image</texture></p><p> </control></p><p> <control></p><p> <type>label</type></p><p> <id>1</id></p><p> <posX>250</posX></p><p> <posY>70</posY></p><p> <label>#header.label</label></p><p> <font>font16</font></p><p> <align>right</align></p><p> <textcolor>ffffffff</textcolor></p><p> </control></p><p> <control></p><p> <description>Number of Files Label</description></p><p> <type>label</type></p><p> <id>1</id></p><p> <posX>260</posX></p><p> <posY>530</posY></p><p> <label>#itemcount</label></p><p> <align>left</align></p><p> <textcolor>ffffffff</textcolor></p><p> </control></p><p> <control></p><p> <description>Selected item Label</description></p><p> <type>fadelabel</type></p><p> <id>1</id></p><p> <posX>660</posX></p><p> <posY>70</posY></p><p> <width>400</width></p><p> <label>#selecteditem</label></p><p> <font>font14</font></p><p> <align>right</align></p><p> <textcolor>ffffffff</textcolor></p><p> </control></p><p> <control></p><p> <type>image</type></p><p> <id>1</id></p><p> <posX>75</posX></p><p> <posY>370</posY></p><p> <texture>#header.hover</texture></p><p> </control> </p><p> </controls></p><p></window></p><p>[/code]</p><p></p><p>These new features are not in the 0.1.3.0 release but will be available in the next CVS build or two.</p><p></p><p>Cheers,</p><p>Smirnoff.</p></blockquote><p></p>
[QUOTE="Smirnuff, post: 17603, member: 10545"] 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: [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> [/code] 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> [/code] 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> [/code] 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. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Skins
Skinning engine improvements
Contact us
RSS
Top
Bottom