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 2005-07-17, 14:47   #1 (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 Skinning engine improvements

Hi Guys -

We've added the ability to import/include files into the skin markup files, the idea being to move all the common markup into smaller and easier to manage files in the hope that we can minimize the amount of work skinners are required to do to offer new skins and to make it easier for the maintainers to do their job.

The syntax is pretty straightforward, the following would be a typical example of how this new feature could be used:

Code:
<window>
	<id>6</id>
	<defaultcontrol>2</defaultcontrol>
	<allowoverlay>yes</allowoverlay>

	
	<define>#header.label:134</define>
	<define>#header.image:videos_logo.png</define>
	<define>#header.hover:hover_my videos.png</define>

	<controls>

		
		<import>common.window.xml</import>

		<control>
			<type>group</type>
			<description>group element</description>
			<animation>FlyInFromLeft</animation>
			<control>
				<description>View-As button</description>
				<type>button</type>
				<id>2</id>
				<posX>60</posX>
				<posY>97</posY>
				<label>100</label>
			</control>
	...
	...
	...
</window>
In order to realize the full benefits from import/include files we also had to add the <define> tag. The tag allows a basic form of parameter to be used so that the imported files can be as generic as possible. A define tag's value is a simple name - value pairing:

Code:
<define>name:value</define>

<define>#header.label:No name</define>
<define>#header.label:34</define>
Any occurance of the token represented by the define's name will be replaced with the appropriate value in any imported markup.

The following is an example of how an imported file could look:

Code:
<window>
	<controls>
		<control>
			<description>BG</description>
			<type>image</type>
			<id>1</id>
			<posX>0</posX>
			<posY>0</posY>
			<width>720</width>
			<height>576</height>
			<texture>background.png</texture>
		</control>
		<control>
			<type>image</type>
			<id>1</id>
			<posX>60</posX>
			<posY>20</posY>
			<texture>#header.image</texture>
		</control>
		<control>
			<type>label</type>
			<id>1</id>
			<posX>250</posX>
			<posY>70</posY>
			<label>#header.label</label>
			<font>font16</font>
			<align>right</align>
			<textcolor>ffffffff</textcolor>
		</control>
		<control>
			<description>Number of Files Label</description>
			<type>label</type>
			<id>1</id>
			<posX>260</posX>
			<posY>530</posY>
			<label>#itemcount</label>
			<align>left</align>
			<textcolor>ffffffff</textcolor>
		</control>
		<control>
			<description>Selected item Label</description>
			<type>fadelabel</type>
			<id>1</id>
			<posX>660</posX>
			<posY>70</posY>
			<width>400</width>
			<label>#selecteditem</label>
			<font>font14</font>
			<align>right</align>
			<textcolor>ffffffff</textcolor>
		</control>
		<control>
			<type>image</type>
			<id>1</id>
			<posX>75</posX>
			<posY>370</posY>
			<texture>#header.hover</texture>
		</control>		
	</controls>
</window>
These new features are not in the 0.1.3.0 release but will be available in the next CVS build or two.

Cheers,
Smirnoff.
Smirnuff is offline   Reply With Quote
Old 2005-07-17, 16:28   #2 (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 Named colors

We have also updated the skinning engine to allow the use of named colours, the color names are based upon the standard HTML palette as specified by the W3C:

Click to see color names.

The skinning engine still accepts numeric values, particularly useful if you want to specify a non-default alpha value. Examples of how to use are as follows:

Code:
<textcolor>White</textcolor>

<textcolor>#20FFFFFF</textcolor>

<textcolor>#330099</textcolor>

<textcolor>Gainsboro</textcolor>


<textcolor>White:#60</textcolor>


<textcolor>White:96</textcolor>
So far this support covers the following markup tags:

Code:
<textcolor/>
<colorkey/>
<colordiffuse/>
We'd be greatful if you could start using # to signify that its a non-named color, there is currently code to handle this but it would be nice to remove this workaround.
Smirnuff is offline   Reply With Quote
Old 2005-07-20, 22:49   #3 (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 Layout Managers - Swinging the Avalon way

Layout managers are a really neat and simple way to create some really complex layouts that you would not normally be able to support without having to write line after line of code.

Those with a Java background will most likely be familiar with the most common ones, StackLayout, GridLayout and BorderLayout for instance.

Well the good news is that we are starting to implement layout managers in MP. A StackLayout and GridLayout have been added to CVS today and as time allows more will be added with the aim of reducing the complexity of the skin markup files, with the ultimate aim of having markup with next to no coordinate requirements and automagic scaling capabilities.

more info about the two supported layouts will when time permits but in the meantime feel free to search google for 'stacklayout' and 'gridlayout'.

For the time being only group controls will be able to utilize layout managers and to do so you must use the <layout> tag as follows:

Code:
	<control>
		<type>group</type>
		<layout>StackLayout(20)</layout>
		<posX>60</posX>
		<posY>97</posY>

		...
		...
		...
	</control>
A stack layout can be declared as follows:

Code:
	
	<layout>StackLayout</layout>

	
	<layout>StackLayout(10)</layout>

	
	<layout>StackLayout(2, Horizontal)</layout>
To use a grid layout you can declare the layout as:

Code:
	
	<layout>GridLayout</layout>

	
	<layout>GridLayout(4)</layout>

	
	<layout>GridLayout(0, 6)</layout>

	
	<layout>GridLayout(3, 0, 10, 15)</layout>

	
	<layout>GridLayout(3, 0, 10, 15, Vertical)</layout>
to be continued...
Smirnuff is offline   Reply With Quote
Old 2005-10-05, 08:59   #4 (permalink)
Portal Member
 
mbuzina's Avatar
 
Join Date: Apr 2005
Location: Germany
Age: 34
Posts: 459
Thanks: 1
Thanked 2 Times in 2 Posts

Country:


Default Re: Layout Managers - Swinging the Avalon way

Quote:
Originally Posted by Smirnuff
To use a grid layout you can declare the layout as:
Some ideas for additions to the grid layout (for me almost the "only" possible layout):
  • Allow controls to span more than 1 row / column
    Allow controls to specify if they like to grow horizontally / vertical or if they want to stay their size
    Add an option to merge "grid in grid". E.g. your outer grid is 5/5 and in cell 2/2 you have a grid (2x2) and you select this to span 2 rows & 2 columns the result of the merge would be everything fitted to your original 5x5 grid.

Just my 2 cents worth of ideas (you told me so :wink: )
__________________
*** Power is nothing without control ***
mbuzina is offline   Reply With Quote
Old 2005-10-31, 15:35   #5 (permalink)
Retired Team Member
 
tomtom21000's Avatar
 
Join Date: Apr 2004
Location: Germany
Posts: 1,018
Thanks: 7
Thanked 7 Times in 7 Posts

My System

Default

Nice Animation of the MP-Logo in CVS from today (14:22); B2 skin.

Great. tomtom
__________________
tomtom21000 is online now   Reply With Quote
Old 2005-10-31, 15:48   #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

Hehe that is courtesy of Harley .
Smirnuff is offline   Reply With Quote
Old 2006-01-06, 03:20   #7 (permalink)
Retired Team Member
 
Join Date: Sep 2005
Location: Stockholm
Posts: 124
Thanks: 0
Thanked 0 Times in 0 Posts


Default

Is there a way to have each cell automatically size according to its content? The result I'm after is to have two labels directly after each other in a horizontal grid. I cannot specify the space between the columns since it will change according to the length of the label. Perhaps I have just missed the obvious but I can't get it to work the way I want.
Raven is offline   Reply With Quote
Reply

Bookmarks

Tags
engine, improvements, 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using XMLTV for the new TV Engine for NA EPG. ASiDiE Tips and Tricks 13 2008-04-27 01:57
Req Advice on Flicking between v2/v3 TV Engine for testing/using HappyTalk Get Support 10 2007-01-11 14:19
skinning engine: thumbnails not selectable with mouse zombiepig Fixed 0.2 RC3 Bugs 3 2006-04-10 01:04
Skinning Engine: <selectedColor> tag for thumbnail panels is ignored zombiepig 0.2.0.0 Release Candidate 3 Release and CVS Bugs 0 2006-04-03 05:07
An idea to expand skinning engine Clodo General Development (no feature request here!) 0 2006-01-09 19:37


All times are GMT +1. The time now is 14:50.


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
Advertisement System V2.6 By   Branden