visible condition for user rating (1 Viewer)

stdly

MP Donator
  • Premium Supporter
  • April 19, 2008
    238
    41
    Home Country
    Canada Canada
    I use this code to show My User Rating but I would like to not have it show if I have not rated the movie yet.

    Right now this code shows "My Rating : /5" without a rating and "My Rating : 3/5" with a rating is there a visible condition I can add to this code to only show it when I have rated the movies.

    Code:
        <control>
          <description>user_rating Label</description>
          <type>label</type>
          <label>My Rating :</label>
          <posX>360</posX>
          <posY>728</posY>
          <width>200</width>
          <font>AvalonLight12</font>
          <align>right</align>	  
          <textcolor>ff8f8f8f</textcolor>
          <shadowAngle>45</shadowAngle>
          <shadowDistance>2</shadowDistance>
          <shadowColor>FF000000</shadowColor>
          <visible>facadeview.list+Control.IsVisible(50)</visible>
          <animation effect="fade" start="0" end="100" time="300" delay="350">WindowOpen</animation>
          <animation effect="fade" start="100" end="0" time="0" delay="0">WindowClose</animation>
          <animation effect="fade" start="0" end="100" time="300" delay="350" reversible="false">visible</animation>
        </control>
        <control>
          <description>User Rating</description>
          <type>label</type>
          <label>#MovingPictures.UserMovieSettings.user_rating / 5</label>
          <id>0</id>
          <posX>370</posX>
          <posY>728</posY>
          <width>110</width>
          <font>AvalonLight12</font>
          <align>left</align>	  
          <textcolor>ff8f8f8f</textcolor>
          <shadowAngle>45</shadowAngle>
          <shadowDistance>2</shadowDistance>
          <shadowColor>FF000000</shadowColor>
          <visible>facadeview.list+Control.IsVisible(50)</visible>
          <animation effect="fade" start="0" end="100" time="300" delay="350">WindowOpen</animation>
          <animation effect="fade" start="100" end="0" time="0" delay="0">WindowClose</animation>
          <animation effect="fade" start="0" end="100" time="300" delay="350" reversible="false">visible</animation>
        </control>
     

    ltfearme

    Community Plugin Dev
  • Premium Supporter
  • June 10, 2007
    6,751
    7,196
    Sydney
    Home Country
    Australia Australia
    Try this:
    Code:
    <visible>facadeview.list+Control.IsVisible(50)+!string.equals(#MovingPictures.UserMovieSettings.user_rating,)</visible>

    Basically its just checking that the field is not empty.
     

    stdly

    MP Donator
  • Premium Supporter
  • April 19, 2008
    238
    41
    Home Country
    Canada Canada
    Try this:
    Code:
    <visible>facadeview.list+Control.IsVisible(50)+!string.equals(#MovingPictures.UserMovieSettings.user_rating,)</visible>

    Basically its just checking that the field is not empty.

    ltfearme,
    Thank you very much!
    I understand the code and can't believe this was right in front of my eyes all the time "MovingPictures.UserMovieSettings.user_rating".
    now I will try TV Series.
     

    Users who are viewing this thread

    Top Bottom