Skinning Basics - Help needed (1 Viewer)

eightyf

Portal Member
May 14, 2007
23
3
55
Munich
Home Country
Germany Germany
Hi,
this is my first posting here and I really struggled quite awhile with myself - but after leafing through the wikis (german and english) as well as a great part of both forums I am by no means nearer to a solution, than before. So here I am, pleading for help ;-)

As you have probably figured I am a total newbie when it comes to MP skinning. I have done this before on some other occasions, but those where merely graphical issues I had to fight with (mostly touchscreen remotes).
Here are some basic questions, which are vital for my sucessful skinning attempts:

  1. In the Skinning Architecture article, tags like "action" or "hyperlink" are mentioned. Unfortunately I cannot seem to find those tags for most of the buttons in the XML pages. One exception is the settings.xml, where "hyperlink" tags are used, but mostly the buttons used on different pages (for example on the mydvds.xml) seem to relate to some predefined action. "View as..." is one of them: OK, looks like this one needs to have ID 2. When pressed it cycles through the different view styles (list, icons. big icons, filmstrip). Is this function "hardcoded" or can it be changed via some XML file that I must then have missed?
  2. Next issue, same situation: is it then possible to create single buttons for list-, icon- etc. views. If so, how are they adressed?
  3. When utilizing a thumbnail screen (or list, or whatever) how does MP know, what to display? In the aforementioned myDVDs.xml i haven't found any reference on the listview/thumbnailpanel controls, which tells MP that it should show all my imported videos. Is this also controlled via the ID? And if so, is there a list which describes, what control with which ID does what?
Normally I can google my way out of any situation, but this time I am really at a loss. As far as I understand it, it should be possible to create any XML file, assign an ID to this page. From now on, it should be possible to jump to this screen via a button which has a hyperlink (or action?) tag with the correct ID assigned to it? Correct? Because this doesn't work at all.
Sorry for all those dumb questions, any help or link would be gladly appreciated.
Thank you in advance
André
 

rtv

Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    No dumb questions - just a fairly old skinning engine which isn't very easy to understand in the beginning ;-)

    You're already quite close; these "IDs" map to controls which are hardcoded. This means MP relies on certain listcontrols, buttons, label, etc and "finds" them via their ID. Unfortunately this also means that for changing general control behaviour you need to ask a dev or (even better) download Visual Studio Express C# (free) and look at the source code for those controls. Sounds harder than it actually is ;)
     

    eightyf

    Portal Member
    May 14, 2007
    23
    3
    55
    Munich
    Home Country
    Germany Germany
    Hi rtv,
    thanks for your prompt answer - I just haven't got round to learning C (#,+ or ++), just some scripting languages, which are derivatives.
    Actually I don't want to change the behaviour of the controls (if that's not possible without recoding), but I'd love to at least understand what they do.
    Where can I find this information? Only in the source code?
    OK, I know it's preposterous, but since you were so kind to answer my posting...
    Let's take the View-as-button as example.

    From the controls tree in the editor, I drag a button template to the screen, assign an ID 2 for it. Now it's an View-as-button and the labels cycle through when pressing this button.
    I guess I now need to insert a listcontrol, a thumbnailpanel and... hmmm a filmstrip control. Those get IDs somewhere between 10 and 13 (dunno the exact ones).
    How does MP know now, what to display?
    Since listcontrol, thumbnailpanel etc. are all templates which can be used for any kind of list?
    On my example page (myDVds.xml) all imported video files are displayed. Where is the reference to this page and why aren't - say - my music files displayed?
    Or is there a kind of "mapping", which defines: if a thumbnail panel is inserted on the mydvds.xml page, it will show video files, whereas if it is inserted into mypics.xml it will show photo thumbnails?
    I think - or strongly hope - if I once understand the relation of the templates, functions, IDs and controls I could begin skinning. Right now, it's more like: dragging a button here or there, changing IDs and see what happens.
    Thank you for your patience
    André
     

    mirk

    Retired Team Member
  • Premium Supporter
  • June 2, 2006
    863
    64
    Växjö, Sweden
    Home Country
    Sweden Sweden
    Hi rtv,
    thanks for your prompt answer - I just haven't got round to learning C (#,+ or ++), just some scripting languages, which are derivatives.
    Actually I don't want to change the behaviour of the controls (if that's not possible without recoding), but I'd love to at least understand what they do.
    Where can I find this information? Only in the source code?
    OK, I know it's preposterous, but since you were so kind to answer my posting...
    Let's take the View-as-button as example.

    From the controls tree in the editor, I drag a button template to the screen, assign an ID 2 for it. Now it's an View-as-button and the labels cycle through when pressing this button.
    I guess I now need to insert a listcontrol, a thumbnailpanel and... hmmm a filmstrip control. Those get IDs somewhere between 10 and 13 (dunno the exact ones).
    How does MP know now, what to display?
    Since listcontrol, thumbnailpanel etc. are all templates which can be used for any kind of list?
    On my example page (myDVds.xml) all imported video files are displayed. Where is the reference to this page and why aren't - say - my music files displayed?
    Or is there a kind of "mapping", which defines: if a thumbnail panel is inserted on the mydvds.xml page, it will show video files, whereas if it is inserted into mypics.xml it will show photo thumbnails?
    I think - or strongly hope - if I once understand the relation of the templates, functions, IDs and controls I could begin skinning. Right now, it's more like: dragging a button here or there, changing IDs and see what happens.
    Thank you for your patience
    André

    It seems like you using the old skineditor. For what i know its very outdated.
    To make/edit skins you have to open the xml files in a ordernery text editor. If you start looking at the xml files for BlueTwo you can see that most of the controls have a description that tell what the control does.
    When a plugin is made the programmer hard code that for exaple. control with ID 30 is a button and when its pressed the view is change. The only thing the skinner can do is too deside how the button would look like and where to place it.
    The skinner also have the possibility so add a "skin controlled" button if you want. It looks like a ordenery "hardcoded" button but you add the action or the hyperlink tags. The action is used for example when you want to add a button that ejects the DVD. The hyperlink tag is used when you want to add a button that takes you to another screen in MP.

    Hardcoded button.
    Starts to play the DVD-film.
    Code:
                             <control>
    				<description>Play DVD</description>
    				<type>button</type>
    				<id>6</id>
    				<animation effect="fade" time="400">WindowClose</animation>
    				<animation effect="fade" time="400">WindowOpen</animation>
    				<animation effect="zoom" start="70,70" end="100,100" center="640,360"  time="400" >WindowOpen</animation>
    				<animation effect="zoom" start="100,100" end="130,130" center="640,360"  time="400" >WindowClose</animation>
    				<posY>70</posY>
    				<posX>840</posX>
    				<label>341</label>
    				<onleft>20</onleft>
    				<onright>7</onright>
    				<onup>17</onup>
    				<ondown>50</ondown>
    				<width>205</width>
    				<textureNoFocus>bottomborder.png</textureNoFocus>
    			</control>


    Skinbased button. (Action tag)
    Does action 100(hardcoded to pop out the dvd)

    Code:
                              <control>
    				<description>Eject Disc</description>
    				<type>button</type>
    				<id>7</id>
    				<animation effect="fade" time="400">WindowClose</animation>
    				<animation effect="fade" time="400">WindowOpen</animation>
    				<animation effect="zoom" start="70,70" end="100,100" center="640,360"  time="400" >WindowOpen</animation>
    				<animation effect="zoom" start="100,100" end="130,130" center="640,360"  time="400" >WindowClose</animation>
    				<posY>70</posY>
    				<posX>1045</posX>
    				<label>654</label>
    				<onleft>6</onleft>
    				<onright>7</onright>
    				<onup>17</onup>
    				<ondown>50</ondown>
    				[B]<action>100</action>[/B]
    				<width>205</width>
    				<textureNoFocus>bottomborder.png</textureNoFocus>
    			 </control>


    Skinbased button ( hyperlink )
    Takes you to to the screen with id 5900 (trailer screen)

    Code:
                             <control>
    				<description>Trailers</description>
    				<type>button</type>
    				<id>8</id>
    				[B]<hyperlink>5900</hyperlink>[/B]
    				<posY>500</posY>
    				<posX>750</posX>
    				<label>5906</label>
    			</control>
     

    rtv

    Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    That basically is all you need to know. The "Section" of MP is hardcoded to the skinfile's window ID on the top.

    E.g. that "MyRadioLastFM.xml" 's 7890 will "start" exactly this plugin.
    Code:
    <window>
        <id>7890</id>

    Read more about skinning in the wiki
     

    eightyf

    Portal Member
    May 14, 2007
    23
    3
    55
    Munich
    Home Country
    Germany Germany
    mirk & rtv,
    thank you very much - I think now I at least understood the basic concept.
    As for the skinning, I use the editor to place the elements, then save the XML and reopen it with a text editor to insert tags and the like.
    You mentioned some predefined functions (eg. action 100 ejects DVD, button ID 6 does the same). Are those functions / IDs listed somewhere? Would be great. If not I can use the good old principle of try 'n error.
    Again thank you both very much - you really were a great help.
    André
     

    Users who are viewing this thread

    Top Bottom