2009-07-06, 00:40
Hi,
In order to avoid code duplication in my PM3-HD skin modification, I would like to use the same defined button with two different settings that will result in a 32x28px button OR in a 64x56px button.
As my English is far from perfect, to avoid confusion, here is a complete example I would like to do. In the "includes.xml", there is this code :
Depending on the bolean condition, I would like to change few parameters ONLY. Like this :
Any help would be really appreciated, thanks !
In order to avoid code duplication in my PM3-HD skin modification, I would like to use the same defined button with two different settings that will result in a 32x28px button OR in a 64x56px button.
As my English is far from perfect, to avoid confusion, here is a complete example I would like to do. In the "includes.xml", there is this code :
Code:
<control type="button" id="600">
<posx>0</posx>
<posy>2</posy>
<width>32</width>
<height>28</height>
<label>-</label>
<texturefocus>PlayerControls-PrevFO.png</texturefocus>
<texturenofocus>PlayerControls-PrevNF.png</texturenofocus>
<onleft>50</onleft>
<onright>601</onright>
<onup>610</onup>
<ondown>607</ondown>
<onclick>XBMC.PlayerControl(Previous)</onclick>
</control>
Code:
<control type="button" id="600">
<posx>0</posx>
<posy>2</posy>
[color=red]<if>[/color]!Skin.HasSetting(double_size)
<width>32</width>
<height>28</height>
[color=red]<else>[/color]
<width>64</width>
<height>56</height>
[color=red]<endif>[/color]
<label>-</label>
<texturefocus>PlayerControls-PrevFO.png</texturefocus>
<texturenofocus>PlayerControls-PrevNF.png</texturenofocus>
<onleft>50</onleft>
<onright>601</onright>
<onup>610</onup>
<ondown>607</ondown>
<onclick>XBMC.PlayerControl(Previous)</onclick>
</control>
Any help would be really appreciated, thanks !