Variable value for <defaultcontrol>
#1
Is something like this possible?

PHP Code:
<defaultcontrol always="true">#VAR[videodefaultcontrol]</defaultcontrol> 

The variable is defined by Skin.String, such as:

PHP Code:
<variable name="videodefaultcontrol">
    <
value condition="Skin.String(menuentry,movies)">301</value>
    <
value condition="Skin.String(menuentry,tvshows)">301</value>
    <
value condition="Skin.String(menuentry,videos)">50</value>
    <
value condition="Skin.String(menuentry,favs)">50</value>
</
variable

Fouled something up, or just can't be handled like this?

EDIT:
As an aside, I'm changing the control direction currently with a bit of a hack.

Pointing <defaultcontrol> to an invisible button control, and using button <onfocus>, like this:

PHP Code:
<control type="button" id="106">
    <
left>0</left>
    <
top>0</top>
    <
width>0</width>
    <
height>0</height>
    <
onfocus condition="Skin.String(menuentry,movies) | Skin.String(menuentry,tvshows)">SetFocus(301)</onfocus>
    <
onfocus condition="Skin.String(menuentry,videos) | Skin.String(menuentry,favs)">SetFocus(50)</onfocus>
    <
texturefocus>-</texturefocus>
    <
texturenofocus>-</texturenofocus>
</
control
Reply
#2
Variables dont work in that tag afaik. Use SetFocus(ID) with conditional onloads instead.
Reply
#3
Thanks BigNoid.
Reply

Logout Mark Read Team Forum Stats Members Help
Variable value for <defaultcontrol>0