2012-09-04, 16:07
seems like we are unable to use variables in buttons. is this a bug?
if i define this:
and call it here:
it doesn't use the images defined in the variables, but if i use them directly it works. it also works using the variables in the texture tag of image controles.
if i define this:
PHP Code:
<variable name="AccentColor">
<value condition="SubString(Skin.CurrentColourTheme,Brown)">brown.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Blue)">blue.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Green)">green.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Lime)">lime.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Magenta)">magenta.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Orange)">orange.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Pink)">pink.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Purple)">purple.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Red)">red.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Viridian)">viridian.png</value>
<value>black.png</value>
</variable>
<variable name="AccentColor_Light">
<value condition="SubString(Skin.CurrentColourTheme,Brown)">brown_light.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Blue)">blue_light.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Green)">green_light.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Lime)">lime_light.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Magenta)">magenta_light.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Orange)">orange_light.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Pink)">pink_light.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Purple)">purple_light.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Red)">red_light.png</value>
<value condition="SubString(Skin.CurrentColourTheme,Viridian)">viridian_light.png</value>
<value>black_light.png</value>
</variable>
and call it here:
PHP Code:
<control type="button" id="1000">
<description>Buttons</description>
<width>350</width>
<height>48</height>
<align>left</align>
<aligny>center</aligny>
<font>SortMenu</font>
<label>-</label>
<textoffsetx>5</textoffsetx>
<texturefocus>$VAR[AccentColor_Light]</texturefocus>
<texturenofocus>$VAR[AccentColor]</texturenofocus>
<pulseonselect>false</pulseonselect>
<textcolor>AccentNegative</textcolor>
<focusedcolor>AccentNegative</focusedcolor>
<disabledcolor>Unfocused</disabledcolor>
</control>
it doesn't use the images defined in the variables, but if i use them directly it works. it also works using the variables in the texture tag of image controles.