How do I do an alternate control (1 Viewer)

jimwin

Portal Pro
December 23, 2007
94
13
Home Country
England England
I modified some of the blue3wide skin files a while back to create a link back to the "My Lyrics" plugin from MyMusic by replacing the "Now Playing" control. Recently I updated from 1.0.2 to 1.1.0 final, and I'm going through the skin files again and I'm having a problem.

What I used before was 2 controls with the same ID, and set one to visible if "My Lyrics" is installed, and one if its is not, like this:
Code:
<control>
            <description>Now playing</description>
            <type>button</type>
            <id>11</id>
            <posX>71</posX>
            <posY>291</posY>
            <label>4540</label>
            <hyperlink>510</hyperlink>
            <onright>50</onright>
            <onup>12</onup>
            <ondown>9</ondown>
            <visible>!plugin.isenabled(My Lyrics)</visible> 
</control>
<control>
            <description>My Lyrics</description>
            <type>button</type>
            <id>11</id>
            <posX>71</posX>
            <posY>291</posY>
            <label>My Lyrics</label>
            <hyperlink>90478</hyperlink>
            <onright>50</onright>
            <onup>12</onup>
            <ondown>9</ondown>
            <visible>plugin.isenabled(My Lyrics)</visible> 
</control>

This code worked fine in 1.0.2, but its not allowing the control to be selected in 1.1.0. Any ideas how I can get this effect in 1.1.0?
 

jimwin

Portal Pro
December 23, 2007
94
13
Home Country
England England
I went for the same IDs so that scrolling "up" and "down" the list works properly. Is that the wrong thing to do?
 

SilentException

Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    You can use different id's.. When a control isn't focused it'll go to next control. Let me give you example (id10 and id13 are controls before and after, id11 and id12 are your two controls).

    This is how skin file should be set up:

    id10 ----ondown----> id11 ----ondown----> id12 ----ondown----> id13

    id13 ---- onup ----> id12 ---- onup ----> id11 ---- onup ----> id10


    The navigation will work just fine if any of id12 or id11 is hidden.
     

    jimwin

    Portal Pro
    December 23, 2007
    94
    13
    Home Country
    England England
    Weird, I was sure I tried that before and it didn't work that well! Thanks, its working great now.

    One interesting thing to note though: In the B3W Music Playlist XML, the left menu doesn't have coordinates for the buttons. In this case MP leaves a gap where the "not visible" button should be...
     

    Users who are viewing this thread

    Top Bottom