Page tree


Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Corrected bad formatting.

...

  • Required:  No
  • Type of Change:  Feature

Skin maintenance difficulty is compounded becomes more difficult when the same

Code Block
languagexml
<define>

<define> tag appears in multiple skin xml files.  This new feature allows you to place

Code Block
languagexml
<define>

skin elements <define> tags in the references.xml file, for use by all skin xml files.

Description of Change

Simply place:

Code Block
languagexml
<define>...</define>

tags in the references.xml file, and refer to these definitions in any of your skin xml files.  The <define> elements tags typically appear before the first <control> element tag (this is not required, but it is likely a good standard) and at . <define> tags occupy the same position in the hierarchy as the <control> elements (

Code Block
languagexml
<define>

and

Code Block
languagexml
<control>

tags (<define> and <control> are siblings).

This implementation does not alter the prior implementation of the

Code Block
languagexml
<define>

node. You may <define> tag.   You can still place a

Code Block
languagexml
<define>

node inside the <window> node of an xml skin file. <define> tag within the scope of a <window> tag in an xml file.  However, if you place the same

Code Block
languagexml
<define>

node <define> tag in both the references.xml file as well as and the skin xml file for a window definition then , the value defined in the skin xml file will override overrides the value set in the references.xml file. This behavior mirrors the present behavior of the references.xml control "template" attributes being , which are overridden by the values defined in skin the window xml file.

Additional Information and References

Mantis Issue:

3017

Related xml(s):

references.xml

Windows IDs:

 


Related Wiki Page(s):

Skin Architecture

Author:

Marvman

Date added:

2009-25-10

XML/Code Samples

Code Block
languagealt2
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<controls>
	<skin>
		<width>1366</width>
		<height>768</height>
		<version>1.0.1.0</version>
	</skin>
	<define>#screenWidth:1366</define>
	<define>#screenHeight:768</define>
	<define>#screenTitleTextColor:FFFFFFFF</define>
	<define>#timeTextColor:FFFFFFFF</define>
	<style Name="smallTitle">
		<id>0</id>
		<width>220</width>
		<font>font10</font>
		<textcolor>ffffffff</textcolor>
		<shadowAngle>45</shadowAngle>
		<shadowDistance>2</shadowDistance>
		<shadowColor>ff222222</shadowColor>
	</style>
	<control>
		<description>default image</description>
		<type>image</type>
		<id>1</id>
		<posX>0</posX>
		<posY>0</posY>
		<width>32</width>
		<height>32</height>
		<texture>background.png</texture>
		<colorkey>0</colorkey>
		<colordiffuse>ffffffff</colordiffuse>
		<filtered>yes</filtered>
		<centered>no</centered>
		<keepaspectratio>no</keepaspectratio>
		<visible>yes</visible>
	</control>