MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Community Skins and Plugins » Skins


Skins You are working on a new Skin? Post it here!

Reply
 
Thread Tools Display Modes
Old 2007-05-29, 20:05   #1 (permalink)
Portal Member
 
eightyf's Avatar
 
Join Date: May 2007
Location: Munich
Age: 38
Posts: 23
Thanks: 1
Thanked 3 Times in 1 Post

Country:

My System

Default Skinning Basics - Help needed

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é
eightyf is offline   Reply With Quote
Old 2007-05-29, 23:06   #2 (permalink)
rtv
Portal Developer
 
rtv's Avatar
 
Join Date: Apr 2005
Location: Osnabruck
Posts: 2,563
Thanks: 91
Thanked 102 Times in 75 Posts

Country:

My System

Default

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
__________________
rtv is offline   Reply With Quote
Old 2007-05-30, 00:19   #3 (permalink)
Portal Member
 
eightyf's Avatar
 
Join Date: May 2007
Location: Munich
Age: 38
Posts: 23
Thanks: 1
Thanked 3 Times in 1 Post

Country:

My System

Default

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é
eightyf is offline   Reply With Quote
Old 2007-05-30, 18:37   #4 (permalink)
Portal Designer
 
mirk's Avatar
 
Join Date: Jun 2006
Location: Växjö, Sweden
Age: 25
Posts: 845
Thanks: 43
Thanked 58 Times in 20 Posts

Country:

My System

Default

Quote:
Originally Posted by eightyf View Post
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>
				<action>100</action>
				<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>
				<hyperlink>5900</hyperlink>
				<posY>500</posY>
				<posX>750</posX>
				<label>5906</label>
			</control>
__________________
Download SpinSafe skins | TVSeries Logos | Swedish TV logos
Found a bug in one of the SpinSafe skins? Why not add it to the SpinSafe bugtracker...
mirk is offline   Reply With Quote
Old 2007-05-30, 19:48   #5 (permalink)
rtv
Portal Developer
 
rtv's Avatar
 
Join Date: Apr 2005
Location: Osnabruck
Posts: 2,563
Thanks: 91
Thanked 102 Times in 75 Posts

Country:

My System

Default

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
__________________
rtv is offline   Reply With Quote
Old 2007-05-30, 22:42   #6 (permalink)
Portal Member
 
eightyf's Avatar
 
Join Date: May 2007
Location: Munich
Age: 38
Posts: 23
Thanks: 1
Thanked 3 Times in 1 Post

Country:

My System

Default

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é
eightyf is offline   Reply With Quote
Old 2008-03-09, 19:22   #7 (permalink)
Portal Member
 
Join Date: May 2007
Posts: 61
Thanks: 9
Thanked 0 Times in 0 Posts

Country:

My System

Default

Hi,

are these 'action' codes listed anywhere?
I'm trying to set up a 'Play CD' button on the BasicHome screen of the xFace skin, as detailed in this thread:
How do I change BasicHome buttons??

Any help would be greatly appreciated
Cheers
Jeditrav is offline   Reply With Quote
Reply

Bookmarks

Tags
basics, needed, skinning

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Back to the basics czar879 General Support 5 2006-10-01 10:44
Flash for skinning? BigCheese Skins 3 2006-04-25 20:53
Skinning question antonyfirewalk Skins 9 2005-10-12 22:41
Getting started with skinning Anonymous Skins 0 2004-12-05 14:50
DVB Basics on Doom9 Molokoids Tips and Tricks 0 2004-05-10 22:27


All times are GMT +1. The time now is 03:38.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress