Skin Variables / Conditional Labels
#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
Reply
#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
Reply
#48
`Black Wrote:This might work:
Good thinking, works great Smile Cheers!
Reply
#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
Reply
#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>
Reply
#51
Yes, it is working but if I open the guide menu in my skin (Xperience1080), the image is hidden. This is not the case if I use a visible condition and no variable. I may have something to do with how often the condition gets evaluated but I'm not sure.
Image
Reply
#52
Container.TvshowThumb and Container.SeasonThumb don't work in variables

Below is just for making my point
Code:
<variable name="PosterVar">
    <value>$INFO[Container.TvshowThumb]</value>
  </variable>

doesn't return in
Code:
<control type="image">
        <description>Cover image</description>
        <posx>0</posx>
        <posy>0</posy>
        <width>486</width>
        <height>720</height>
        <texture background="true">$VAR[PosterVar]</texture>
        <include>Animation_VisibleChange200</include>
        <aspectratio>stretch</aspectratio>
      </control>

If I insert it directly in the image control it does work.
Reply
#53
Just confirmed this - my guess would be it's not getting the container id.
Reply
#54
Big_Noid Wrote:Container.TvshowThumb and Container.SeasonThumb don't work in variables
Should be fixed in f20f1924.
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
Reply
#55
pieh Wrote:Should be fixed in f20f1924.

Yep it's fixed, man you work fast Big Grin
Reply
#56
What a great improvement to XBMC skinning, the amount of code I'm getting rid of is ridiculous Big Grin
Reply
#57
It seems $INFO[Container.ShowPlot] is not working in variables.
Reply
#58
This will probably fix that -

pieh Wrote:Should be fixed in f20f1924.
Reply
#59
I'm using newest code and Container.ShowPlot is working here (earlier fix shouldn't affect it). Do You have maybe more info on this?
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
Reply
#60
Yeah, it's working, my bad. It not displaying had to do with the order in which I was defining the various plot and description properties.
Reply

Logout Mark Read Team Forum Stats Members Help
Skin Variables / Conditional Labels0