Panel Container: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Ronie
No edit summary
>NedBot
m (Wikitable class; cosmetic changes)
Line 1: Line 1:
The panel container is one of several containers used to display items from file lists in various ways. The panel container is very flexible - it's essentially a multi-column list. The layout of the items is very flexible and is up to the skinner.
The panel container is one of several containers used to display items from file lists in various ways. The panel container is very flexible - it's essentially a multi-column list. The layout of the items is very flexible and is up to the skinner.
===Example===
=== Example ===
<source lang="xml">
<source lang="xml">
<control type="panel" id="52">
<control type="panel" id="52">
Line 80: Line 80:
</source>
</source>


===Available Tags===
=== Available Tags ===
In addition to the [[Default Control Tags]] the following tags are available. Note that each tag is '''lower case''' only. This is important, as xml tags are case-sensitive.
In addition to the [[Default Control Tags]] the following tags are available. Note that each tag is '''lower case''' only. This is important, as xml tags are case-sensitive.
{| class="dtable"
{| class="wikitable"
|- class="userrow"
|-  
| class="usercell" | '''viewtype'''
| '''viewtype'''
| class="usercell" | The type of view. Choices are list, icon, wide, wrap, biglist, bigicon, bigwide, bigwrap, info and biginfo. The label attribute indicates the label that will be used in the "View As" control within the GUI. It is localizable via strings.xml.
| The type of view. Choices are list, icon, wide, wrap, biglist, bigicon, bigwide, bigwrap, info and biginfo. The label attribute indicates the label that will be used in the "View As" control within the GUI. It is localizable via strings.xml.
|- class="userrow"
|-  
| class="usercell" | '''orientation'''
| '''orientation'''
| class="usercell" | The orientation of the panel. Defaults to vertical.
| The orientation of the panel. Defaults to vertical.
|- class="userrow"
|-  
| class="usercell" | '''pagecontrol'''
| '''pagecontrol'''
| class="usercell" | Used to set the <id> of the page control used to control this panel.
| Used to set the <id> of the page control used to control this panel.
|- class="userrow"
|-  
| class="usercell" | '''scrolltime'''
| '''scrolltime'''
| class="usercell" | The time (in ms) to scroll from one item to another.  By default, this is 200ms.  The panel will scroll smoothly from one item to another as needed. Set it to zero to disable the smooth scrolling. The scroll movement can be further adjusted by selecting one of the available [[Tweeners|tween]] methods.
| The time (in ms) to scroll from one item to another.  By default, this is 200ms.  The panel will scroll smoothly from one item to another as needed. Set it to zero to disable the smooth scrolling. The scroll movement can be further adjusted by selecting one of the available [[Tweeners|tween]] methods.
|- class="userrow"
|-  
| class="usercell" | '''itemlayout'''
| '''itemlayout'''
| class="usercell" | Specifies the layout of items in the list. Requires both width and height attributes set. The <itemlayout> then contains as many label and image controls as required. [[Container Item Layout|See here for more information.]]
| Specifies the layout of items in the list. Requires both width and height attributes set. The <itemlayout> then contains as many label and image controls as required. [[Container Item Layout|See here for more information.]]
|- class="userrow"
|-  
| class="usercell" | '''focusedlayout'''
| '''focusedlayout'''
| class="usercell" | Specifies the layout of items in the list that have focus. Requires both width and height attributes set. The <focusedlayout> then contains as many label and image controls as required. [[Container Item Layout|See here for more information.]]
| Specifies the layout of items in the list that have focus. Requires both width and height attributes set. The <focusedlayout> then contains as many label and image controls as required. [[Container Item Layout|See here for more information.]]
|- class="userrow"
|-  
| class="usercell" | '''content'''
| '''content'''
| class="usercell" | Used to set the item content that this panel will contain. Allows the skinner to setup a panel anywhere they want with a static set of content, as a useful alternative to the grouplist control. [[Static List Content|See here for more information]]
| Used to set the item content that this panel will contain. Allows the skinner to setup a panel anywhere they want with a static set of content, as a useful alternative to the grouplist control. [[Static List Content|See here for more information]]
|- class="userrow"
|-  
| class="usercell" | '''preloaditems'''
| '''preloaditems'''
| class="usercell" | Used in association with the background image loader. [[Background Image Loader|See here for more information]]
| Used in association with the background image loader. [[Background Image Loader|See here for more information]]
|}
|}


[[category:Skin Development]]
[[Category:Skin Development]]

Revision as of 07:53, 26 November 2011

The panel container is one of several containers used to display items from file lists in various ways. The panel container is very flexible - it's essentially a multi-column list. The layout of the items is very flexible and is up to the skinner.

Example

<control type="panel" id="52">
	<posx>190</posx>
	<posy>100</posy>
	<width>485</width>
	<height>425</height>
	<onleft>9000</onleft>
	<onright>60</onright>
	<onup>52</onup>
	<ondown>52</ondown>
	<scrolltime tween="sine" easing="out">200</scrolltime>
	<viewtype label="536">icon</viewtype>
	<pagecontrol>60</pagecontrol>
	<include>contentpanelslide</include>
	<itemlayout height="141" width="120">
		<control type="image">
			<posx>10</posx>
			<posy>10</posy>
			<width>100</width>
			<height>100</height>
			<info>ListItem.Icon</info>
		</control>
		<control type="image">
			<posx>80</posx>
			<posy>75</posy>
			<width>32</width>
			<height>32</height>
			<info>ListItem.Overlay</info>
		</control>
		<control type="label">
			<posx>60</posx>
			<posy>115</posy>
			<width>110</width>
			<height>22</height>
			<font>font13</font>
			<selectedcolor>green</selectedcolor>
			<align>center</align>
			<info>ListItem.Label</info>
		</control>
	</itemlayout>
	<focusedlayout height="141" width="120">
		<control type="image">
			<width>110</width>
			<height>110</height>
			<posx>5</posx>
			<posy>5</posy>
			<texture>folder-focus.png</texture>
			<animation effect="zoom" end="0,0,120,120" time="100">focus</animation>
		</control>
		<control type="image">
			<posx>10</posx>
			<posy>10</posy>
			<width>100</width>
			<height>100</height>
			<info>ListItem.Icon</info>
			<animation effect="zoom" end="5,5,110,110" time="100">focus</animation>
		</control>
		<control type="image">
			<posx>80</posx>
			<posy>75</posy>
			<width>32</width>
			<height>32</height>
			<info>ListItem.Overlay</info>
			<animation effect="slide" end="5,5" time="100">focus</animation>
		</control>
		<control type="label">
			<posx>60</posx>
			<posy>120</posy>
			<width>110</width>
			<height>22</height>
			<font>font13</font>
			<selectedcolor>green</selectedcolor>
			<align>center</align>
			<info>ListItem.Label</info>
		</control>
	</focusedlayout>
</control>

Available Tags

In addition to the Default Control Tags the following tags are available. Note that each tag is lower case only. This is important, as xml tags are case-sensitive.

viewtype The type of view. Choices are list, icon, wide, wrap, biglist, bigicon, bigwide, bigwrap, info and biginfo. The label attribute indicates the label that will be used in the "View As" control within the GUI. It is localizable via strings.xml.
orientation The orientation of the panel. Defaults to vertical.
pagecontrol Used to set the <id> of the page control used to control this panel.
scrolltime The time (in ms) to scroll from one item to another. By default, this is 200ms. The panel will scroll smoothly from one item to another as needed. Set it to zero to disable the smooth scrolling. The scroll movement can be further adjusted by selecting one of the available tween methods.
itemlayout Specifies the layout of items in the list. Requires both width and height attributes set. The <itemlayout> then contains as many label and image controls as required. See here for more information.
focusedlayout Specifies the layout of items in the list that have focus. Requires both width and height attributes set. The <focusedlayout> then contains as many label and image controls as required. See here for more information.
content Used to set the item content that this panel will contain. Allows the skinner to setup a panel anywhere they want with a static set of content, as a useful alternative to the grouplist control. See here for more information
preloaditems Used in association with the background image loader. See here for more information