<id> number consistency (1 Viewer)

rkooten

Portal Pro
August 3, 2008
101
27
Home Country
Hello Chreekar,

I'm busy modding a skin and I noticed the following: Other "plugins" suchs as My Music and My Videos use <id> number 2 for the View button. My Emulator seems to use <id> number 10.

This makes it impossible to rely on one common.facade.xml (which contains shared properties for filmstrip, icon and listview). Changing the <id> to 2 breaks My Emulators.

Was this done intentionally for some reason? If you could change this it would break existing skinfiles, but should make the plugin more consistent with others...
 

rkooten

Portal Pro
August 3, 2008
101
27
Home Country
Would it be possible to attach two <id> numbers? That way existing skins will still be compatible and My Emulators would become consistent with other "plugins".

The sourcecode from the My Music plugin shows why I started this thread:

Code:
    #region SkinControls

    [SkinControlAttribute(50)]    protected GUIFacadeControl facadeView = null;
    [SkinControlAttribute(2)]     protected GUIButtonControl btnViewAs = null;
    [SkinControlAttribute(3)]     protected GUISortButtonControl btnSortBy = null;
    [SkinControlAttribute(6)]     protected GUIButtonControl btnViews = null;

    [SkinControlAttribute(8)]     protected GUIButtonControl btnSearch = null;
    [SkinControlAttribute(12)]    protected GUIButtonControl btnPlayCd = null;
    [SkinControlAttribute(10)]    protected GUIButtonControl btnSavedPlaylists = null;

    #endregion

The facadeviews (which I have built one common.facade.xml skinfile for) always use <id> number 50. This is usually set as the default control of a page. The facadeviews all have a onright attribute that points to the view-as button (id=2) because it is a consistent element. For example:

Code:
   <!-- This defines the various types of filebrowsing that are used: lists, thumbnail panels, filmstrips and playlists -->
   <control>
    <type>facadeview</type>
    <id>50</id>
    
    <!-- list of filenames and pagecounter. Position and layout are defined in references.xml -->
    <control>
     <description>listcontrol</description>
     <type>listcontrol</type>
     <onright>2</onright>
    </control>   
    
    <!-- thumbnails. Position and layout are defined in references.xml -->   
    <control>
     <description>Thumbnail Panel</description>
     <type>thumbnailpanel</type>
     <onright>2</onright>
    </control>
    
    <!-- This is the row of thumbs in filmstrip view. Position and layout are defined in references.xml -->
    <control>
     <description>Filmstrip view</description>
     <type>filmstrip</type>
     <onup>2</onup>
     <thumbs flipY="true" diffuse="Thumb_Mask.png"></thumbs>
    </control>
    
    <!-- list of filenames and pagecounter. Supports extra buttons for editting playlist. Position and layout are defined in references.xml  -->
    <control>
     <description>playlist listcontrol</description>
     <type>playlistcontrol</type>
     <onright>2</onright>
    </control>
    
   </control>

I have found out that id numbers are not global, but are hardcoded and can be different for each plugin. However, since My Emulators is very similar in appearance to My Videos, My Music and My Radio it might be an idea to follow the same numbering.

This is just something I ran into, so I wanted to share it with you.
 

Users who are viewing this thread

Top Bottom