2014-04-15, 19:43
Hi there,
I am studying conditionals from the XBMC skinning manual.
I want to create a condition where, if the list item in my wraplist comes into focus, the background of the window changes.
The wraplist functions as I expect it to.
Here's what I have so far:
The menu item, which is supposed to "trigger" the background change:
and the background control itself:
This does not work. The background texture is visible all the time, no matter what comes into focus and goes out of it.
I am studying conditionals from the XBMC skinning manual.
I want to create a condition where, if the list item in my wraplist comes into focus, the background of the window changes.
The wraplist functions as I expect it to.
Here's what I have so far:
The menu item, which is supposed to "trigger" the background change:
Code:
<control type="wraplist" id="300">
<description>Home Wraplist</description>
<posx>0</posx>
<posy>72</posy>
<width>680</width>
<height>190</height>
<onup>300</onup>
<ondown>300</ondown>
<onleft>300</onleft>
<onright>300</onright>
<focusposition>3</focusposition>
<scrolltime>200</scrolltime>
<autoscroll>false</autoscroll>
<itemlayout width="650" height="190">
<control type="image">
<texture>$INFO[ListItem.Icon]</texture>
<width>180</width>
<height>180</height>
<posx>90</posx>
<posy>0</posy>
</control>
<control type="label">
<posx>250</posx>
<posy>50</posy>
<height>90</height>
<info>ListItem.Label</info>
<font>XLarge</font>
<textcolor>white</textcolor>
<align>left</align>
</control>
</itemlayout>
<focusedlayout width="650" height="190">
<control type="image">
<texture>$INFO[ListItem.Icon]</texture>
<height>180</height>
<width>180</width>
<posx>90</posx>
<posy>0</posy>
</control>
<control type="label">
<posx>250</posx>
<posy>50</posy>
<height>90</height>
<info>ListItem.Label</info>
<font>XLarge</font>
<selectedcolor>red</selectedcolor>
<align>left</align>
</control>
</focusedlayout>
<content>
<item id="1">
<description>Movies</description>
<label>31006</label>
<icon>icons/popcorn.png</icon>
<onclick>ActivateWindow(Video,movietitles)</onclick>
</item>
<item id="2">
<description>Music</description>
<label>31004</label>
<icon>icons/earphones.png</icon>
<onclick>ActivateWindow(Music)</onclick>
</item>
<item id="3">
<description>Settings</description>
<label>13000</label>
<icon>icons/earphones.png</icon>
<onclick>ActivateWindow(Settings)</onclick>
</item>
</content>
</control> <!-- end wraplist -->
and the background control itself:
Code:
<!-- Background texture for the movie menu item control -->
<control type="image">
<width>1280</width>
<visible condition="Control.HasFocus(1)">true</visible>
<texture>unnamed.png</texture>
</control>
This does not work. The background texture is visible all the time, no matter what comes into focus and goes out of it.