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
 
LinkBack Thread Tools Display Modes
Old 2006-05-01, 23:52   #1 (permalink)
Portal Member
 
Join Date: Apr 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts


Default Controls in references.xml

Hi
Is it possible to create a new type of control in references.xml that contains several controls?
i.e. is this possible?

Code:
<control>
  <type>MyNewControl</type>
    <control>
      <type>button</type>
      ...
    </control>
    <control>
      <type>label</type>
      ...
    </control>
    <control>
      <type>image</type>
      ...
    </control>
</control>

I want to be able to create 5 "MyNewControl" controls on a screen, but I'm trying to avoid copying and pasting the xml 5 times.

Thanks
landrews320 is offline   Reply With Quote
Old 2006-05-02, 14:19   #2 (permalink)
Retired Team Member
 
Join Date: Apr 2004
Age: 34
Posts: 821
Thanks: 0
Thanked 0 Times in 0 Posts

Country:

My System

Default

no, you can't.
But you can make a new xml file called common.buttons.xml for example.
The you can include in other xml's like
<include>common.buttons.xml</include>

and the contents of the file will be put in the spot of the include.

The common.buttons.xml does need to be a valid xml file so you have to have:
<window>
<controls>
put stuff here
</controls>
</window>
__________________
MrMario64 is offline   Reply With Quote
Old 2006-05-02, 21:30   #3 (permalink)
Portal Member
 
Join Date: Apr 2006
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Thanks for the info. I have already created another xml file as you mentioned.
Out of interest, whats the difference between using <include></include> and <import></import> to include xml from other screen files?

Does <import> place the xml somewhere differently within the file?
landrews320 is offline   Reply With Quote
Old 2006-05-02, 21:43   #4 (permalink)
Portal Member
 
Smirnuff's Avatar
 
Join Date: Dec 2004
Location: United Kingdom
Posts: 630
Thanks: 0
Thanked 2 Times in 1 Post

My System

Default

Quote:
Out of interest, whats the difference between using <include></include> and <import></import>
No difference between them. The developer responsible was moving from C++ to C# around that time and this kinda reflects that, started as <include> but was then changed to <import>, both were kept so as to not break any existing markup.
Smirnuff is offline   Reply With Quote
Old 2006-05-02, 23:13   #5 (permalink)
Retired Team Member
 
Join Date: Apr 2004
Age: 34
Posts: 821
Thanks: 0
Thanked 0 Times in 0 Posts

Country:

My System

Default

and I am using the import function extensively on my new skin.
I hereby like to thank the programmer again for making skinning easier for us
I still miss him.....




__________________
MrMario64 is offline   Reply With Quote
Old 2006-05-02, 23:30   #6 (permalink)
Portal Member
 
Smirnuff's Avatar
 
Join Date: Dec 2004
Location: United Kingdom
Posts: 630
Thanks: 0
Thanked 2 Times in 1 Post

My System

Default

Quote:
I am using the import function extensively on my new skin
I'm sure that he'll be pleased to hear that and that he wishes he had enough time to be contributing to the project once again. .
Smirnuff is offline   Reply With Quote
Reply

Bookmarks

Tags
controls, referencesxml

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 On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MediaPortalEditor - New BETA Release Avaiable hamheed Skins 51 2007-06-24 16:58
NVIDIA Decoder icon and controls ivankurac3 Tips and Tricks 1 2006-05-01 21:07
Movie controls not easily selected juzz General Support 0 2006-04-03 12:12
Need some help... moving controls zombiepig General Development (no feature request here!) 0 2005-04-04 01:38
Keyboard shortcut extensions for MCE style remote controls mPod General Development (no feature request here!) 17 2005-03-02 22:00


All times are GMT +1. The time now is 07: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