Skin Variables / Conditional Labels

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
pieh Offline
Team-XBMC Member
Posts: 665
Joined: Aug 2010
Reputation: 13
Location: Poland
Post: #41
initially <height> <width> <posx> <posy> and other numeric "properties" of controls are out of luck (we don't have numeric control properties hooked to infomanager yet). But this is defenitely something I will pursue in next steps

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
find quote
Jeroen Offline
Skilled Skinner
Posts: 1,882
Joined: Feb 2008
Reputation: 4
Location: The Netherlands
Post: #42
Good to hear it's planned, cheers Smile
find quote
Hitcher Online
Skilled Skinner
Posts: 9,937
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #43
This has been pushed in the latest nightly (30/09) and works perfectly - I'm already using it.

Thanks.

[Image: sig_zps3af3b48e.jpg]
find quote
Jeroen Offline
Skilled Skinner
Posts: 1,882
Joined: Feb 2008
Reputation: 4
Location: The Netherlands
Post: #44
sweet Big Grin
Thanks Pieh and everyone involved!
find quote
`Black Online
Skilled Skinner
Posts: 2,021
Joined: Apr 2009
Reputation: 50
Location: Germany
Post: #45
Awesome. Smile
This is a very big improvement and will save a lot of code in certain situations.

[Image: xp1080-21.png]
find quote
Jeroen Offline
Skilled Skinner
Posts: 1,882
Joined: Feb 2008
Reputation: 4
Location: The Netherlands
Post: #46
I tried the following:

<texture fallback="$VAR[variablename]" background="true">$INFO[ListItem.Thumb]</texture>

Which doesn't appear to be working. I know this is only the first steps, but I would like to know if this will be possible later down the road? Because I could do some serious code cleaning with it Smile
find quote
`Black Online
Skilled Skinner
Posts: 2,021
Joined: Apr 2009
Reputation: 50
Location: Germany
Post: #47
As far as I know fallback doesn't allow $INFO so $VAR also won't work I guess.

This might work:

Code:
<variable name="Thumb">
  <value condition="!IsEmpty(ListItem.Thumb)">$INFO[ListItem.Thumb]</value>
  <value condition="IsEmpty(ListItem.Thumb) + SomeCondition1">Fallback1</value>
  <value condition="IsEmpty(ListItem.Thumb) + SomeCondition2">Fallback2</value>
  [...]
</variable>

<texture background="true">$VAR[Thumb]</texture>

[Image: xp1080-21.png]
find quote
Jeroen Offline
Skilled Skinner
Posts: 1,882
Joined: Feb 2008
Reputation: 4
Location: The Netherlands
Post: #48
`Black Wrote:This might work:
Good thinking, works great Smile Cheers!
find quote
`Black Online
Skilled Skinner
Posts: 2,021
Joined: Apr 2009
Reputation: 50
Location: Germany
Post: #49
I have some small problems with the value conditions... I now have this for the background fanart in my TVGuide:

Code:
<variable name="TVGuideInfoFanart">
    <value condition="Control.HasFocus(200) | stringcompare(Window(home).Property(TVGuide.MondayList),1)">$INFO[Container(200).ListItem.Property(Fanart)]</value>
    <value condition="Control.HasFocus(201)">$INFO[Container(201).ListItem.Property(Fanart)]</value>
    <value condition="Control.HasFocus(202)">$INFO[Container(202).ListItem.Property(Fanart)]</value>
    <value condition="Control.HasFocus(203)">$INFO[Container(203).ListItem.Property(Fanart)]</value>
    <value condition="Control.HasFocus(204)">$INFO[Container(204).ListItem.Property(Fanart)]</value>
    <value condition="Control.HasFocus(205)">$INFO[Container(205).ListItem.Property(Fanart)]</value>
    <value condition="Control.HasFocus(206)">$INFO[Container(206).ListItem.Property(Fanart)]</value>
</variable>

So only one control with $VAR[TVGuideInfoFanart] as texture. If I now open my guide menu (playercontrols), fanart is not visible anymore. It was working with the previous solution of 7 different controls with visible conditions.

[Image: xp1080-21.png]
find quote
Big_Noid Offline
Skilled Skinner
Posts: 2,627
Joined: Jul 2010
Reputation: 68
Location: Below sea level
Post: #50
`Black Wrote:I have some small problems with the value conditions... I now have this for the background fanart in my TVGuide:

Code:
<variable name="TVGuideInfoFanart">
    <value condition="Control.HasFocus(200) | stringcompare(Window(home).Property(TVGuide.MondayList),1)">$INFO[Container(200).ListItem.Property(Fanart)]</value>
    <value condition="Control.HasFocus(201)">$INFO[Container(201).ListItem.Property(Fanart)]</value>
    <value condition="Control.HasFocus(202)">$INFO[Container(202).ListItem.Property(Fanart)]</value>
    <value condition="Control.HasFocus(203)">$INFO[Container(203).ListItem.Property(Fanart)]</value>
    <value condition="Control.HasFocus(204)">$INFO[Container(204).ListItem.Property(Fanart)]</value>
    <value condition="Control.HasFocus(205)">$INFO[Container(205).ListItem.Property(Fanart)]</value>
    <value condition="Control.HasFocus(206)">$INFO[Container(206).ListItem.Property(Fanart)]</value>
</variable>

So only one control with $VAR[TVGuideInfoFanart] as texture. If I now open my guide menu (playercontrols), fanart is not visible anymore. It was working with the previous solution of 7 different controls with visible conditions.

This is working for me in script-NextAired-TVGuide.xml with same variable used:
Code:
<control type="group">
        <visible>!IsEmpty(Window(home).property(TVGuide.BackgroundFanart))</visible>
        <control type="image">
          <posx>0</posx>
          <posy>0</posy>
          <width>1280</width>
          <height>720</height>
          <aspectratio>scale</aspectratio>
          <texture background="true">$VAR[TVGuideInfoFanart]</texture>
          <include>backgroundfade</include>
          <fadetime>500</fadetime>
        </control>
</control>
find quote
Post Reply