conditional visibilty for music playing (1 Viewer)

2BitSculptor

Super Moderator
  • Team MediaPortal
  • January 23, 2008
    2,007
    1,052
    South Central Wisconsin
    Home Country
    United States of America United States of America
    You have to load a dummy control to print something off-screen from the music only info that isn't used in the video info. Make sure it is placed earlier than any music or video stuff. (Taken from common.home.overlays.xml in the Streamed MP skin)

    <control>
    <description>dummy (visible when music is playing)</description>
    <type>label</type>
    <id>3337</id>
    <posX>2000</posX>
    <label>#Play.Current.Album</label>
    <visible>player.hasmedia+control.hastext(3337)</visible>
    </control>

    Then when setting visibility, use the id of the dummy control as a switch to show or not show a later control if music is, or is not playing.

    from my basichome.xml:
    <control>
    <description>Video logo</description>
    <type>videowindow</type>
    <id>987</id>
    <posX>500</posX>
    <posY>350</posY>
    <width>100</width>
    <height>70</height>
    <centered>yes</centered>
    <keepaspectratio>yes</keepaspectratio>
    <visible>Player.HasMedia+!control.isvisible(3337)</visible>
    <textureFocus>-</textureFocus>
    </control>
    for when music is playing and you don't want the videoframe to show the CD cover.

    or
    <control>
    <id>1</id>
    <type>fadelabel</type>
    <posX>580</posX>
    <posY>350</posY>
    <width>180</width>
    <visible>Player.HasMedia+control.isvisible(3337)</visible>
    <label>#Play.Current.Title</label>
    <align>left</align>
    <font>font12</font>
    <textcolor>ffffffff</textcolor>
    </control>
    for when you have video playing and don't want Video info printing where your music info is placed


    Chuck
     

    VdR

    MP Donator
  • Premium Supporter
  • October 17, 2006
    612
    16
    Belgium
    Home Country
    Netherlands Netherlands
    Smart!

    Thank you all.

    I will try as soon as I have a chance. Will be a while I'm afraid.

    Funny, I solved my other bigger skin issue using dummy buttons. I'll have to try dummy more often.


    VdR

    :D
     

    Users who are viewing this thread

    Top Bottom