XBMC Skinning Manual

From XBMC4Xbox
Jump to navigation Jump to search

General Information

XBMC includes a new GUI library written from scratch. This library allows you to skin/change everything you see in XBMC, from the images, the sizes and positions of all controls, colours, fonts, and text, through to altering navigation and even adding new functionality.

The skin system is quite complex, and this portion of the manual is dedicated to providing in depth information on how it all works, along with tips to make the experience a little more pleasant.

If you are just getting started with skinning XBMC, then it is suggested that the best way to learn is by modifying one of the many existing skins that are available. The default skin, Project Mayhem 3, includes almost all the various tricks and features that make the XBMC skinning engine so powerful, so is an ideal place to start. You may wish to start by having a look through the tutorial section on skinning XBMC as well as the "Skinning XBMC" article, and try modifying a window or two by adding a button, or altering the textures or layout.

Anatomy of a Skin

XBMC skins are packaged up and located in the skin/ folder off the main XBMC folder. This is the folder where all skins are placed and listed. By default there's only one called “Project Mayhem III”, by Chokemaniac which is the default skin.

Any additional skins you create, ordownload from places such as [www.xboxskins].net can be placed here for XBMC to auto-detect them and allow you to load them up from within the Appearance Settings. It is suggested that if you want to make your own skin, then starting by copying an existing skins files over into a new folder (let's say skin/myskin) is a good place to start. You can then edit each of the files as you become more familiar with the skinning system.

Each skin folder contains several subdirectorys, and one file:

myskin/font
This subdirectory contains all fonts used by the skin. you can add/replace fonts here
myskin/media
This subdirectory contains all the media files (.png/.gif/.jpg...) You can replace/edit these as you like.
myskin/skin.xml
This contains the information that XBMC uses to find the other files that XBMC requires to describe it's skin. It also contains credits information, and versioning information.
myskin/PAL
This is a resolution-specific directory. XBMC can run in multiple resolutions, and thus can use different files for some resolutions (as there is a big difference between NTSC at 720x480 pixels and 1080i at 1920x1080 pixels!) See here for the order in which it looks for skin files.

Skin Themes

All the basic media files for a skin should be compressed into the Textures.xpr file, and placed in the media/ folder. You can use the tool XBMCTex for this. All the images that make up the default skin theme should be in the Textures.xpr file.

In addition to this, XBMC allows other .xpr files in the media/ folder, each one representing a different theme for your skin. For instance, you could tint all your main textures a red colour, and create a new theme package Red.xpr. This gives users more choice in the look of a particular skin, and only the textures change when you change themes – the layout stays the same. If the user has selected a theme, then when a control requires a texture, XBMC will first look in the <themename>.xpr file for the texture. It will fall back to the Textures.xpr file if <themename>.xpr doesn't contain the image. This means that the theme .xpr files need only contain the changed textures – all other textures will fallback to using Textures.xpr as usual.

A suggested method of creating a theme is as follows:

  1. Run XBMCTex.exe on the folder containing the default texture files, to generate Textures.xpr as you would normally do.
  2. Identify the textures you wish to have themed and copy them to a separate folder.
  3. Create a separate folder for each theme outside of your normal skin work area, and place the altered copies of each of the textures in them.
  4. Run XBMCTex.exe on each of the theme folders created in step 3 to create the themed .xpr files (note you can use the -output switch with XBMCTex.exe to name the theme appropriately).
  5. Place Textures.xpr and each of the theme .xpr files in the media/ folder of your skin. XBMC will automatically pick them up.

Please note that for none xbox platforms there is no need to compress your theme aside from obvious portability reasons of course.

References

The other special (and arguably the most important skinning file of all) is references.xml. This is, as its title suggests, a place from which you can define the default look, size, and positioning of controls, to save you replicating many of the control's attributes throughout the window .xml files. For instance, you can setup the size, and textures used for a button control, thus allowing you to leave those details out in the rest of the skin files, unless ofcourse you want to override the default look or size etc. in a particular window.

This is extremely valuable as it allows you to greatly simplify a lot of the work in building a skin. For one thing, it means that once you have references.xml setup, many of the default parameters for a different resolution can be done by just altering the parameters within the references.xml file for the different resolution.

The layout of references.xml is as follows:

  <references>
    <control>
       ...
    </control>
    ...
    <control>
       ...
    </control>
  </refereces>

All it consists of is a <control> block for each control that you wish to define. To see the different tags available for each <control> block, see the Controls section below.

The Window XML Files

The other xml files each define the skin for a single window. They all have the same basic layout, allowing you to place different controls on the window, and define how navigation should operate.

A list of all window .xml files and what they represent may be found in Apendix I: List of Windows.

The important thing to remember is that each window has a unique identifying number (id). This is how XBMC identifies the window from within the source code.

Furthermore, many of the controls within each window should have a unique id as well, unless they're just used as images or labels where navigation is unimportant and XBMC does not need to be able to identify them uniquely. The window id's are all listed in the Apendix I: List of Windows.

The structure of the window .xml files can be found below in the Window Structure.

Skin.xml

Each skin in XBMC contains the skin.xml file which sets up an overview of the skin and provides credits and versioning information.

Example

  <skin>
    <defaultresolution>pal</defaultresolution>
    <defaultresolutionwide>pal16x9</defaultresolutionwide>
    <defaultthemename>default</defaultthemename>
    <effectslowdown>1</effectslowdown>
    <version>2.0</version>
    <zoom>1.1</zoom>
    <credits>
      <skinname>My Skin Name</skinname>
      <name>Awesome Skinner 1</name>
      <name>Awesome Skinner 2</name>
      <name>Awesome Skinner 3</name>
    </credits>
    <startwindows>
      <window id="0">513</window>
      <window id="1">0</window>
      <window id="3">My awesome new window</window>
    </startwindows>
  </skin>

One thing to note is that all tag names are lower case. XML tag names are case sensitive!

Overview of the Tags

defaultresolution Default resolution folder for this skin. This is the base directory that all window xml file requests will fall back to.
defaultresolutionwide Default widescreen resolution folder for this skin. This is the directory that all window xml file requests from widescreen resolutions (1080i, 720p, 480p 16x9, NTSC 16x9 and PAL 16x9) will fallback to. If the file isn't found in this window, then it'll fall back to the <defaultresolution> folder.
defaultthemename Default theme name. Currently set to: Default.
effectslowdown A multiplier that is applied to all <animation> effect lengths in the skin. Useful to slow down all animations globally so that you can better configure timings and see interactions between animating controls.
version This specifies the version of the skin engine that this skin will operate with. The current minimum skin version is 2.0. The XBMC team tries to keep backward compatibility for as long as possible (generally before a major version jump).
zoom Default zoom amount/multiplier (gui setting skin zoom to allow for overscan adjustment of skin), default value will be 1.0 wich is no zoom.
credits The credits block tag.
name A single credit line for the skin. You can have up to 5 lines of credits, and they should be limited to 50 characters per line.
startwindows The startwindows block tag.
window A window that your skin can start from. The id attribute is it's skin id, the value is the name of the window. If a numeric value is given, it is considered a value to lookup in strings.xml

How window xml files are found

XBMC can run in many differing resolutions, and a skin should try and cater to all these resolutions. The easiest way is to develop for one specific resolution and make sure that all controls contain <width> and <height> tags. That way, XBMC can scale the controls to the new screen resolution.

However, you may choose to develop alternative window xml files for differing resolutions (such as for HDTV resolutions, or for widescreen versus 4x3 resolutions).

The order that XBMC looks for it's skin files are as follows:

  1. It first looks in the current screenmode folder (one of 1080i, 720p, NTSC16x9, NTSC, PAL16x9 or PAL)
  2. If the current screenmode is 1080i, it then looks in the 720p folder.
  3. If the current screenmode is a widescreen mode (1080i, 720p, NTSC16x9, PAL16x9) then it looks in the <defaultresolutionwide> folder.
  4. Finally, it looks in the <defaultresolution> folder.

This allows you to just put any window files that do not require special treatment for 16x9 resolutions etc. in the <defaultresolution> folder, preventing needless repetition.

Windows

Window Structure

About the Window XML Files

Each window in an XBMC skin is represented by a single .xml file. See here for a list of the standard windows and links to their .xml files.

Each .xml file has the same basic structure – it starts with some heading information that pertains to the window as a whole, and then contains a <controls> block within which all the controls that describe the window are defined.

Window Header

<window>
  <id>4567</id>
  <defaultcontrol always="false">2</defaultcontrol>
  <allowoverlay>yes</allowoverlay>
  <views>50,51,509,510<views>
  <type>dialog</type>
  <visible>Window.IsActive(Home)</visible>
  <animation effect="fade" time="100">WindowOpen</animation>
  <animation effect="slide" end="0,576" time="100">WindowClose</animation>
  <zorder>1</zorder>
  <coordinates>
    <system>1</system>
    <posx>40</posx>
    <posy>50</posy>
    <origin x="100" y="50">Window.IsActive(Home)</origin>
  </coordinates>
  <previouswindow>MyVideos</previouswindow>
  <controls>
    <control>
    </control>
    ....
  </controls>
</window>

One thing to note is that all tag names are lower case. XML tag names are case sensitive!

The header contains the following tags:

id
The id number of the window. This is unique over all the .xml files. See the window list for the list of standard window ids
defaultcontrol
This specifies the default control of the window. This is the id of the control that will receive focus when the window is first opened. Note that most XBMC windows save the current focus when you leave the window, and will return to the last focused item when you return to a window. This behaviour can be stopped by specifying the attribute always="true".
allowoverlay
Setting this tag to true, or yes, indicates that the music or video overlay may be shown when this window is active. If this tag is not present, the state of the previous (or parent) window is used.
type
Specifies the type of window this is. Current options are window, dialog and buttonmenu. Only one window is alowed at a time. A dialog can overlay a window (allowing 2 or more “windows” simultaneously). The buttonmenu is basically a dialog with the added option to place many buttons with just one (changing) label.
visible
Specifies the conditions under which a dialog will be visible. XBMC evaluates this at render time, and shows or hides a dialog depending on the evaluation of this tag. See here for more details. Applies only to <type>dialog</type>.
animation
Specifies the animation effect to perform when opening or closing the window. See here for more details.
zorder
This specifies the “depth” that the window should be drawn at. Windows with higher zorder are drawn on top of windows with lower z-order. All dialogs by default have zorder 1, so if you have a particular dialog that you want underneath all others, give it a zorder of 0. (Note that the normal render order is: The base window, then the overlays (music + video), then dialogs. <zorder> only effects the rendering of the dialogs.
coordinates
This block is used to specify how XBMC should compute the coordinates of all controls.
system
Specifies the coordinate system. If set to 1, all control coordinates are relative to the <posx> and <posy> coordinates in this block.
posx
Sets the horizontal “origin” position of the window. Defaults to 0 if not present.
posy
Sets the vertical “origin” position of the window. Defaults to 0 if not present.
origin
Sets a conditional origin for the window. The window will display at (x,y) whenever the origin condition is met. You can have as many origin tags as you like – they are evaluated in the order present in the file, and the first one for which the condition is met wins. If none of the origin conditions are met, we fall back to the <posx> and <posy> tags.
previouswindow
This can be used to specify a window to force XBMC to go to on press of the Back button. Normally XBMC keeps a “window stack” of previous windows to handle this. This tag allows you to override this behaviour. The value can be either the name of the window, or its id.
views
This tag lets you use view id's beyond 50 to 59 it also lets you set the order in which they cycle with the change view button in the skin. Only useful in My<Foo>.xml windows.
controls
This is the block the defines all controls that will appear on this window.

The Different Types of Controls

XBMC supports many different types of controls.

Click here for the control types and what they all do.

Some of these controls are required on specific windows, as they're necessary for that window to perform it's duty, or, the contents of the control are only valid on a particular window. The mandatory controls for each window are listed in the window list. While the controls are mandatory, you can ofcourse move them about and change their appearance within the windows to your hearts content!

Adding Extra Windows

All of the windows in the window list are defined within the executeable of XBMC itself, as most of them have a specific purpose. However, the skinner may add extra windows as and when they are needed or wanted. The only restriction to this is that only controls that do not require specific source code to operate can be used. This is not too much of a restriction though, as many skinners have found out.

To add an extra window, all you need to do is design up the window's .xml file in the usual way, assign it an <id> outside of the ones defined in the window list, and then name the file customN.xml, where N is a number. You can have as many as you like, as long as they have unique <id>'s, and are named differently. Then just define the <type> of window you want, the coordinate system and so on, add the controls and setup the navigation. To activate your window, you can do it by adding a button control elsewhere in the skin, or you can get it to popup on a press of the controller or remote via keymap.xml and so on. Basically you just need to run XBMC.ActivateWindow(id) from a suitable place.

Controls

Controls are the substance of your skin. They define everything from buttons, to text labels, to visualization placement. This portion of the manual will explain each and every control in detail.

Label Control

The label control is used for displaying text in XBMC. You can choose the font, size, colour, location and contents of the text to be displayed.

Example

  <control type="label" id="1">
        <description>My First label</description>
        <posx>80</posx>
        <posy>60</posy>
        <width>250</width>
        <visible>true</visible>
        <align>center</align>
        <aligny>center</aligny>
        <scroll>false</scroll>
        <label>6</label>
        <info>MusicPlayer.Artist</info>
        <number></number>
        <angle>30</angle>
        <haspath>false</haspath>
        &lt;font>font14&lt;/font>
        <textcolor>FFB2D4F5</textcolor>
        <shadowcolor>ff000000</shadowcolor>
        <wrapmultiline>false</wrapmultiline>
  </control>

Auto Size Labels

Wrapping your label in a grouplist with the auto width and appropriate minium and maximum values. Allows the labels width to dynamically change relevalant to how long the label text is. This allows a image or other control to be alligned to the right of the actual label text no matter how wide the label is.

   <width min="29" max="200">auto</width>

Multi-Line Labels

If you want your label control to span multiple lines, you can insert a new line character in your label. For example:

   <label>This will be on the first line[CR]And this will be on the second line</label>

Also, if you want your label control to conform to the <width> parameter, but still want to be able to give it more content than will fit on one line, then setting:

   <wrapmultiline>true</wrapmultiline>

will cause the text to be cut up (at the spaces in the text) onto multiple lines. Note that if a single word is larger than <width> then it will not be cut, and will still overflow.

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.

align Can be left, right, or center. Aligns the text within the given label <width>. Defaults to left
aligny Can be top or center. Aligns the text within its given label <height>. Defaults to top
scroll When true, the text will scroll if longer than the label's <width>. If false, the text will be truncated. Defaults to false.
label

Specifies the text which should be drawn. You should specify an entry from the strings.xml here (either the XBMC strings.xml or your skin's strings.xml file), however you may also hardcode a piece of text also if you wish, though ofcourse it will not be localisable. You can use the full label formatting syntax and you may also specify more than one piece of information here by using the $INFO and $LOCALIZE formats.

info

Specifies the information that should be presented. XBMC will auto-fill in this info in place of the <label>. See here for more information.

number Specifies a number that should be presented. This is just here to allow a skinner to use a number rather than a text label (as any number given to <label> will be used to lookup in strings.xml)
angle The angle the text should be rendered at, in degrees. A value of 0 is horizontal.
haspath Specifies whether or not this label is filled with a path. Long paths are shortened by compressing the file path while keeping the actual filename full length.
font Specifies the font to use from the font.xml file.
textcolor Specifies the color the text should be, in hex AARRGGBB format, or a name from the colour theme.
shadowcolor Specifies the color of the drop shadow on the text, in AARRGGBB format, or a name from the colour theme.
wrapmultiline If true, any text that doesn't fit on one line will be wrapped onto multiple lines.
scrollspeed Scroll speed of text in pixels per second. Defaults to 60.

Fade Label Control

The fade label control is used for displaying multiple pieces of text in the same space in XBMC. You can choose the font, size, colour, location and contents of the text to be displayed. The first piece of information to display fades in over 50 frames, then scrolls off to the left. Once it is finished scrolling off screen, the second piece of information fades in and the process repeats.

Example

  <control type="fadelabel" id="1">
        <description>My First fadelabel</description>
        <posx>80</posx>
        <posy>60</posy>
        <width>250</width>
        <visible>true</visible>
        <scroll>false</scroll>
        <scrollout>true</scrollout>
        <pauseatend>200</pauseatend>
        <label>6</label>
        <info>MusicPlayer.Genre</info>
        <info>MusicPlayer.Artist</info>
        <info>MusicPlayer.Album</info>
        <info>MusicPlayer.Year</info>
        <font>font14</font>
        <textcolor>FFB2D4F5</textcolor>
        <textoffsetx>20</textoffsetx>
  </control>

Tag Descriptions

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.

label

Specifies the text which should be drawn. You should specify an entry from the strings.xml here, however you may also specify a piece of text yourself if you wish, though ofcourse it will not be localisable. You may also specify more than one piece of information here by using the $INFO and $LOCALIZE formats.

info

Specifies the information that should be presented. XBMC will auto-fill in this info in place of the <label>. See here for more information.

font Specifies the font to use from the font.xml file.
textcolor Specified the color the text should be, in hex AARRGGBB format, or a name from the colour theme.
textoffsetx Specify the offset from the left edge that the text should be rendered at when static (not scrolling). The scrolling text will still scroll using the full <width> of the control.
shadowcolor Specifies the color of the drop shadow on the text, in AARRGGBB format, or a name from the colour theme.
angle Specifies the angle at which the text should be drawn, measured counter clockwise from the horizontal.
scrollout If set to False the fadelabel will only scroll until the last char is to the right side of the width of the fadelabel instead of all the way out to the left.
pauseatend Specifies the time that the text will wait until it fades away before it scrolls again or moves to the next item.
resetonlabelchange If set to false the fadelabel will not reset the scrolling offset when the label's content changes. Useful if you have things such as the play time (in seconds) inside a fadelabel. Defaults to true.
scrollspeed Scroll speed of text in pixels per second. Defaults to 60.

Button Control

The button control is used for creating push buttons in XBMC. You can choose the position, size, and look of the button, as well as choosing what action(s) should be performed when pushed.

Example

<control type="button" id="1">
      <description>My first button control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <visible>true</visible>
      <colordiffuse>FFFFFFFF</colordiffuse>
      <texturefocus>myfocustexture.png</texturefocus>
      <texturenofocus>mynormaltexture.png</texturenofocus>
      <label>29</label>
      <font>font12</font>
      <textcolor>FFFFFFFF</textcolor>
      <disabledcolor>80FFFFFF</disabledcolor>
      <align></align>
      <aligny></aligny>
      <textoffsetx></textoffsetx>
      <textoffsety></textoffsety>
      <pulseonselect></pulseonselect>
      <onclick>XBMC.ActivateWindow(MyVideos)</onclick>
      <onfocus>-</onfocus>
      <onup>2</onup>
      <ondown>3</ondown>
      <onleft>1</onleft>
      <onright>1</onright>
</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.

texturefocus

Specifies the image file which should be displayed when the button has focus. See here for additional information about textures.

texturenofocus Specifies the image file which should be displayed when the button does not have focus.
label The label used on the button. It can be a link into strings.xml, or an actual text label.
font Font used for the button label. From fonts.xml.
textcolor Color used for displaying the button label. In AARRGGBB hex format, or a name from the colour theme.
focusedcolor Color used for the button label when the button has in focus. In AARRGGBB hex format or a name from the colour theme.
disabledcolor Color used for the button label if the button is disabled. In AARRGGBB hex format or a name from the colour theme.
shadowcolor Specifies the color of the drop shadow on the text, in AARRGGBB format, or a name from the colour theme.
angle The angle the text should be rendered at, in degrees. A value of 0 is horizontal.
align Label horizontal alignment on the button. Defaults to left, can also be center or right.
aligny Label vertical alignment on the button. Defaults to top, can also be center.
textoffsetx Amount to offset the label from the left (or right) edge of the button when using left or right alignment.
textoffsety Amount to offset the label from the top edge of the button when using top alignment.
onclick

Specifies the action to perform when the button is pressed. Should be a built in function. See here for more information. You may have more than one <onclick> tag, and they'll be executed in sequence.

onfocus

Specifies the action to perform when the button is focused. Should be a built in function. The action is performed after any focus animations have completed. See here for more information.

Multiselect Control

The multiselect control is used for creating a single line of text with multiple selectable pieces of text that can perform various actions. You can choose the position, size, and look of the text and highlights as well as choosing what action(s) should be performed when items are selected. The multiselect control can also be used inside list containers.

Example

<control type="multiselect" id="13">
      <description>My first multiselect control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <visible>true</visible>
      <texturefocus>myfocustexture.png</texturefocus>
      <texturenofocus>mynormaltexture.png</texturenofocus>
      <label>[ONCLICK Shutdown]Shutdown[/ONCLICK] or [ONCLICK Reboot]Reboot[/ONCLICK] XBMC</label>
      <font>font12</font>
      <textcolor>FFFFFFFF</textcolor>
      <disabledcolor>80FFFFFF</disabledcolor>
      <aligny>center</aligny>
      <textoffsetx></textoffsetx>
      <textoffsety></textoffsety>
      <onup>2</onup>
      <ondown>3</ondown>
      <onleft>1</onleft>
      <onright>1</onright>
</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.

texturefocus

Specifies the image file which should be displayed when a selectable item has focus. It is sized to fit the text, and <textoffsetx> and <textoffsety> are used to space out around the text. See here for additional information about textures.

texturenofocus Specifies the image file which should be displayed behind any selectable text.
label The label used. Selectable text is surrounded in [ONCLICK action]text[/ONCLICK] blocks. You can use the full label formatting syntax as well as info labels.
font Font used for the button label. From fonts.xml.
textcolor Color used for displaying the standard label. In AARRGGBB hex format, or a name from the colour theme.
focusedcolor Color used for the selected text when an item has focus. In AARRGGBB hex format or a name from the colour theme.
disabledcolor Color used for the text when the control is disabled. In AARRGGBB hex format or a name from the colour theme.
shadowcolor Specifies the color of the drop shadow on the text, in AARRGGBB format, or a name from the colour theme.
aligny Label vertical alignment. Defaults to top, can also be center.
textoffsetx Amount to offset the highlight textures from the left and right edges of the selectable text.
textoffsety Amount to offset the label from the top edge of the control when using top alignment.

Image Control

The image control is used for displaying images in XBMC. You can choose the position, size, transparency and contents of the image to be displayed.

Example

<control type="image" id="1">
      <description>My first image control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <visible>true</visible>
      <colordiffuse>FFFFFFFF</colordiffuse>
      <fadetime>200</fadetime>
      <texture border="5" flipY="true" flipX="false">mytexture.png</texture>
      <info>MusicPlayer.Cover</info>
      <aspectratio>keep</aspectratio>
</control>

Image Size and Type Restrictions

For the <texture> tags, and for all <texture> tags in other controls, there is a small set of rules that you should follow if at all possible:

Size

Images can be any size, though some graphics cards allow only power of 2 textures, so this may be a consideration. For the most case, it doesn't really matter what size things are - XBMC will quite happily load most files.

Formats

If you wish to use transparency, then use PNG. It is suggested that you use PNG and JPG as much as possible. Note that once the images are injected into Textures.xbt, they are not stored as JPG or PNG – rather they are stored in a native format used for GPUs for faster loading, such as ARGB or DXTc textures. The size of the images (in kb) is therefore not as important as the size of the images in pixels – so feel free to store them in a lossless (eg PNG) manner if you wish.

The only exception to this is if you require an animated texture. In this case, we support only animated GIF. There are also some animated gifs that may not work. Use ImageReady CS and make sure you set the gif-anim to “restore to background” and they should work fine.

Available Tags and Attributes

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.

aspectratio This specifies how the image will be drawn inside the box defined by <width> and <height>. See here for more information.
texture Specifies the image file which should be displayed. See here for additional information about textures.
bordertexture Specifies the image file which should be displayed as a border around the image. Use the <bordersize> to specify the size of the border. The <width>,<height> box specifies the size of the image plus border.
bordersize Specifies the size of the border. A single number specifies the border should be the same size all the way around the image, whereas a comma separated list of 4 values indicates left,right,top,bottom values.
info Specifies the information that this image control is presenting. XBMC will select the texture to use based on this tag. See here for more information.
fadetime This specifies a crossfade time that will be used whenever the underline <texture> filename changes. The previous image will be held until the new image is ready, and then they will be crossfaded. This is particularly useful for a large thumbnail image showing the focused item in a list, or for fanart or other large backdrops.

MultiImage Control

The MultiImage control is used for displaying a slideshow of images from a folder in XBMC. You can choose the position and size of the slideshow, as well as timing information.

Example

<control type="multiimage" id="1">
      <description>My first slideshow control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <visible>true</visible>
      <imagepath>myimagepath</imagepath>
      <info></info>
      <timeperimage>5000</timeperimage>
      <fadetime>2000</fadetime>
      <pauseatend>10000</pauseatend>
      <randomize>true</randomize>
      <loop>no</loop>
      <aspectratio>stretch</aspectratio>
</control>

Image Size and Type Restrictions

For the <texture> tags, and for all <texture> tags in other controls, there is a small set of rules that you should follow if at all possible:

Size

Images can be any size you like if background loading them from outside the Textures.xpr file, though using anything larger than the size of the control you're rendering is a waste of processor and memory. If they're in Textures.xpr, then they're usually contained within textures that are a multiple of 64 pixels wide.

For optimal memory consumption, then, a multiple of 64 pixels wide should be used.

For non-xbox platforms, this is a moot point.

Formats

If you wish to use full 8 bit transparency, then use PNG. If you only need a single transparent colour, then you can specify this in the <colorkey> tag, so any image will be fine. It is suggested that you use PNG and JPG as much as possible. Note that once the images are injected into Textures.xpr, they are not stored as JPG or PNG – rather they are stored in a xbox native format for faster loading. The size of the images (in kb) is therefore not as important as the size of the images in pixels – so feel free to store them in a lossless (eg PNG) manner if you wish.

The only exception to this is if you require an animated texture. In this case, we only support animated GIF. There are also SOME animated gifs that may not work. Use ImageReady CS and make sure you set the gif-anim to “restore to background” and they should work fine.

Available Tags and Attributes

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.

imagepath Specifies the path containing the images to use for the slideshow. XBMC will first look inside the compressed Textures.xpr file for images, and then will look in the actual folder. The path is relative to the media/ folder if it is not specified completely. It must be a local path (ie on the local harddisk) for speed purposes.
info Specifies the information that this image control is presenting. XBMC will select the texture to use based on this tag. See here for more information.
timeperimage Time in milliseconds that an image is shown for.
fadetime Time in milliseconds to fade between images.
pauseatend Time in milliseconds to pause (in addition to <timeperimage>) on the last image at the end of a complete cycle through the images. Only useful if <loop> is set to yes.
loop If set to no, the last image will display indefinitely. Setting it to yes will loop around once they reach the last image. Defaults to yes.
aspectratio This specifies how the image will be drawn inside the box defined by <width> and <height>. See here for more info

Radio button Control

The radio button control is used for creating push button on/off settings in XBMC. You can choose the position, size, and look of the button. When the user clicks on the radio button, the state will change, toggling the extra textures (textureradiofocus and textureradionofocus). Used for settings controls.

Example

<control type="radiobutton" id="2">
      <description>My first radiobutton control</description>
      <type>radiobutton</type>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <visible>true</visible>
      <colordiffuse>FFFFFFFF</colordiffuse>
      <texturefocus>myfocustexture.png</texturefocus>
      <texturenofocus>mynormaltexture.png</texturenofocus>
      <textureradioon>myradiobutton.png</textureradioon>
      <textureradiooff>myradiobutton_nf.png</textureradiooff>
      <selected>Player.Paused</selected>
      <onclick>PlayerControls(Pause)</onclick>
      <label>29</label>
      <font>font12</font>
      <textcolor>FFFFFFFF</textcolor>
      <disabledcolor>80FFFFFF</disabledcolor>
      <align>left</align>
      <aligny>center</aligny>
      <textoffsetx>4</textoffsetx>
      <textoffsety>5</textoffsety>
      <pulseonselect>false</pulseonselect>
      <onup>2</onup>
      <ondown>3</ondown>
      <onleft>1</onleft>
      <onright>1</onright>
</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.

texturefocus

Specifies the image file which should be displayed when the button has focus. See here for additional information about textures.

texturenofocus Specifies the image file which should be displayed when the button does not have focus.
textureradioon Specifies the image file which should be displayed for the radio button portion when it's the button is on. This texture is positioned on the right of the button – it's positioned 24 pixels from the right edge of the button, and 8 pixels above the center vertically.
textureradiooff Specifies the image file which should be displayed for the radio button portion when the button is off.
label The label used on the button. It can be a link into strings.xml, or an actual text label.
font Font used for the button label. From fonts.xml.
textcolor Color used for displaying the button label. In AARRGGBB hex format, or a name from the colour theme.
disabledcolor Color used for the button label if the button is disabled. In AARRGGBB hex format, or a name from the colour theme.
shadowcolor Specifies the color of the drop shadow on the text, in AARRGGBB format, or a name from the colour theme.
align Label horizontal alignment on the button. Defaults to left, can also be center or right.
aligny Label vertical alignment on the button. Defaults to top, can also be center.
textoffsetx Amount to offset the label from the left (or right) edge of the button when using left or right alignment.
textoffsety Amount to offset the label from the top edge of the button when using top alignment.
selected The boolean condition that when met will cause the control to become selected. see here for more information.
onclick The function to perform when the radio button is clicked. Should be a built in function.
radioposx X offset of the dot or radio button itself
radioposy Y offset of the dot or radio button itself
radiowidth Width in Pixels of the dot or radio button itself
radioheight Height in Pixels offset of the dot or radio button itself

Select button control

The select button control is used for creating a push button that hides multiple options in XBMC. You can choose the position, size, and look of the button, as well as what it looks like when it's pushed in (option arrows etc.)

When the button is pushed, two arrows pop up allowing you to alter the contents of the button (thus select different options). Used to alter the current View mode in My Videos and My Music.

Example

<control type="selectbutton" id="4">
      <description>My first select button control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <visible>true</visible>
      <colordiffuse>FFFFFFFF</colordiffuse>
      <texturefocus>myfocustexture.png</texturefocus>
      <texturenofocus>mynormaltexture.png</texturenofocus>
      <texturebg>mybgtexture.png</texturebg>
      <textureleft>mylefttexture.png</textureleft>
      <textureleftfocus>myleftfocustexture.png</textureleftfocus>
      <textureright>myrighttexture.png</textureright>
      <texturerightfocus>myrightfocustexture.png</texturerightfocus>
      <label>29</label>
      <font>font12</font>
      <textcolor>FFFFFFFF</textcolor>
      <disabledcolor>80FFFFFF</disabledcolor>
      <align></align>
      <alignY></alignY>
      <textoffsetx></textoffsetx>
      <textoffsety></textoffsety>
      <pulseonselect></pulseonselect>
      <onup>2</onup>
      <ondown>3</ondown>
      <onleft>1</onleft>
      <onright>1</onright>
</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.

texturefocus

Specifies the image file which should be displayed when the button has focus. See here for additional information about textures.

texturenofocus Specifies the image file which should be displayed when the button does not have focus.
texturebg This texture is rendered in the background, replacing the texturefocus and texturenofocus textures, when the button is pushed in.
textureleft The texture of the left arrow item when it's not focused. Displayed at the left of the button when it is selected.
textureleftfocus The texture of the left arrow item when it's focused. Displayed at the left of the button when it is selected.
textureright The texture of the right arrow item when it's not focused. Displayed at the right of the button when it is selected.
texturerightfocus The texture of the right arrow item when it's focused. Displayed at the right of the button when it is selected.
label The label used on the button. It can be a link into strings.xml, or an actual text label.
font Font used for the button label. From fonts.xml.
textcolor Color used for displaying the button label. In AARRGGBB hex format, or a name from the colour theme.
disabledcolor Color used for the button label if the button is disabled. In AARRGGBB hex format, or a name from the colour theme.
shadowcolor Specifies the color of the drop shadow on the text. In AARRGGBB hex format, or a name from the colour theme.
align Label horizontal alignment on the button. Defaults to left, can also be center or right.
aligny Label vertical alignment on the button. Defaults to top, can also be center.
textoffsetx Amount to offset the label from the left (or right) edge of the button when using left or right alignment.
textoffsety Amount to offset the label from the top edge of the button when using top alignment.

Toggle button control

The toggle button control is used for creating buttons that have 2 states. You can choose the position, size, and look of the button. When the user clicks on the toggle button, the state will change, toggling the extra textures (alttexturefocus and alttexturenofocus). Used for controls where two states are needed (pushed in and pushed out for instance).

Example

<control type="togglebutton" id="25">
      <description>My first togglebutton control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <visible>true</visible>
      <colordiffuse>FFFFFFFF</colordiffuse>
      <texturefocus>myfocustexture.png</texturefocus>
      <texturenofocus>mynormaltexture.png</texturenofocus>
      <alttexturefocus>myselectedTexture.png</alttexturefocus>
      <alttexturenofocus>myselectedTexture_nf.png</alttexturenofocus>
      <usealttexture>!Player.IsPaused</usealttexture>
      <label>29</label>
      <altlabel>29</altlabel>
      <font>font12</font>
      <textcolor>FFFFFFFF</textcolor>
      <disabledcolor>80FFFFFF</disabledcolor>
      <align>left</align>
      <aligny>center</aligny>
      <textoffsetx>4</textoffsetx>
      <textoffsety>5</textoffsety>
      <pulseonselect>false</pulseonselect>
      <onclick>Player.Pause</onclick>
      <onfocus>-</onfocus>
      <onup>2</onup>
      <ondown>3</ondown>
      <onleft>1</onleft>
      <onright>1</onright>
</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.

texturefocus

Specifies the image file which should be displayed when the button has focus. See here for additional information about texture tags.

texturenofocus Specifies the image file which should be displayed when the button does not have focus.
alttexturefocus Specifies the image file which should be displayed when the toggle button is in it's selected state. This texture replaces the <texturefocus> texture when the toggle button is selected.
alttexturenofocus Specifies the image file which should be displayed when the button is in it's selected state but unfocused.
usealttexture

Specifies the conditions under which the Alternative Textures should be shown. Some toggle button controls are handled by XBMC internally, but any extra ones that the skinner has can be controlled using this tag. See here for more information.

label The label used on the button. It can be a link into strings.xml, or an actual text label.
altlabel The label used on the button. It can be a link into strings.xml, or an actual text label.
font Font used for the button label. From fonts.xml.
textcolor Color used for displaying the button label. In AARRGGBB hex format, or a name from the colour theme.
disabledcolor Color used for the button label if the button is disabled. In AARRGGBB hex format, or a name from the colour theme.
shadowcolor Specifies the color of the drop shadow on the text. In AARRGGBB hex format, or a name from the colour theme.
align Label horizontal alignment on the button. Defaults to left, can also be center or right.
aligny Label vertical alignment on the button. Defaults to top, can also be center.
textoffsetx Amount to offset the label from the left (or right) edge of the button when using left or right alignment.
textoffsety Amount to offset the label from the top edge of the button when using top alignment.
onclick

Specifies the action to perform when the button is pressed. Should be a built in function. See here for more information. You may have more than one <onclick> tag, and they'll be executed in sequence.

onfocus

Specifies the action to perform when the button is focused. Should be a built in function. The action is performed after any focus animations have completed. See here for more information.

Buttonscrollers

NOTE: This control is now obsolete. You should use a list or panel container with static content instead.

The button scroller control is used for creating a list of buttons in XBMC. You can choose the position, size, and look of each button in the list, what each button does, and the look of the list as a whole.

Example

<control>
      <description>My first buttonscroller control</description>
      <type>buttonscroller</type>
      <id>1</id>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <visible>true</visible>
      <texturefocus>myfocustexture.png</texturefocus>
      <texturenofocus>mynormaltexture.png</texturenofocus>
      <font>font12</font>
      <textcolor>FFFFFFFF</textcolor>
      <align></align>
      <aligny></aligny>
      <textoffsetx></textoffsetx>
      <textoffsety></textoffsety>
      <onup>2</onup>
      <ondown>3</ondown>
      <onleft>1</onleft>
      <onright>1</onright>
      <numbuttons>7</numbuttons>
      <buttongap>5</buttongap>
      <orientation>vertical</orientation>
      <defaultbutton>2</defaultbutton>
      <movement>2</movement>
      <alpha>1</alpha>
      <wraparound>true</wraparound>
      <smoothscrolling>true</smoothscrolling>
      <buttons>
        <default>1</default>
        <button id="1">
          <label>0</label>
          <onclick>XBMC.ActivateWindow(MyPrograms)</onclick>
          <texturefocus>programs.png</texturefocus>
          <texturenofocus>programs-nf.png</texturenofocus>
        </button>
        <button id="2">
          <label>5</label>
          <onclick>XBMC.ActivateWindow(MyMusic)</onclick>
          <texturefocus>music.png</texturefocus>
          <texturenofocus>music-nf.png</texturenofocus>
        </button>
        <button id="3">
          <label>3</label>
          <onclick>XBMC.ActivateWindow(MyVideos)</onclick>
          <texturefocus>videos.png</texturefocus>
          <texturenofocus>videos-nf.png</texturenofocus>
        </button>
        <button id="4">
          <label>7</label>
          <onclick>XBMC.ActivateWindow(MyWeather)</onclick>
        </button>
        <button id="5">
          <label>9</label>
          <onclick>XBMC.ActivateWindow(Settings)</onclick>
        </button>
      </buttons>
</control>

Available Tags

Note that each tag is lower case only. This is important, as xml tags are case-sensitive.

description Only used to make things clear for the skinner. Not read by XBMC at all.
type Should be button for a button control.
id Specifies the control's id. The value this takes depends on the control type, and the window that you are using the control on. There are special control id's that must be present in each window. Any other controls that the skinner adds can be any id they like. Obviously they should be unique for buttons, given that they are navigatible, and you want the onup, onleft etc. to make sense.
posx Specifies where the left edge of the button should be drawn. This is offset from the window's coordinates (normally the left edge of the screen, or 0).
posy Specifies where the top edge of the button should be drawn. This is offset from the window's coordinates (normally the top edge of the screen, or 0).
width Specifies the width of the button. The texturefocus and texturenofocus images will be resized to fit into this width.
height Specifies the height of the button. The texturefocus and texturenofocus images will be resized to fit into this height.
visible

Specifies a condition as to when this control will be visible. Can be true, false, or a condition. See here for more information. Defaults to true.

animation

Specifies the animation to be run when the control enters a particular state. See here for more information.

texturefocus

Specifies the default image file which should be displayed when a button has focus. This is overridden by the buttons particular focus texture. You can use animated gif's, jpgs, pngs, or bmps. This should be the path to the image file from the media/ folder of your skin directory. XBMC will first look inside the compressed Textures.xpr file, and if not found, will look inside the media/ folder for the actual skin file.

texturenofocus Specifies the default image file which should be displayed when a button does not have focus. This is overridden by the buttons particular nofocus texture.
font Font used for the button label. From fonts.xml.
textcolor Color used for displaying the button label. In AARRGGBB hex format.
shadowcolor Specifies the color of the drop shadow on the text, in AARRGGBB format.
align Label horizontal alignment on the button. Defaults to left, can also be center or right.
aligny Label vertical alignment on the button. Defaults to top, can also be center.
textoffsetx Amount to offset the label from the left (or right) edge of the button when using left or right alignment.
textoffsety Amount to offset the label from the top edge of the button when using top alignment.
onup Control id to move to when the user moves up off this control.
ondown Control id to move to when the user moves down off this control.
onleft Control id to move to when the user moves left off this control.
onright Control id to move to when the user moves right off this control.
numbuttons Number of buttons shown in the scroller at one time. Defaults to 7.
buttongap Gap (in pixels) between each button in the scroller. Defaults to 5.
orientation Set to horizontal for a horizontal scroller, else it'll be vertical (the default).
defaultbutton The default button slot to highlight with the cursor. Default is 2. 0 is the first slot.
movement The amount of movement the cursor can take before the scroller will scroll. Defaults to 2.
alpha The number of buttons on either side of the default button before fading is applied. Defaults to 0.
wraparound If true, the buttons wrap around inside the scroller (ie going up from button 0 takes you to the last item in the list).
smoothscrolling If true, the buttons scroll smoothly from one slot to the next. If false, they jump positions.
buttons Indicates the start of the button block. See the next section.

The Buttons Block

The <buttons> block is the section that describes the buttons. Each button must have a unique id number, and you can define textures and labels for the button, as well as the action the button performs.

Example

<button id="1">
          <label>0</label>
          <onclick>XBMC.ActivateWindow(MyPrograms)</onclick>
          <texturefocus>programs.png</texturefocus>
          <texturenofocus>programs-nf.png</texturenofocus>
</button>

The buttons are displayed in the button scroller in the order presented in the xml file. The button that is placed in the <defaultbutton> slot is the one with the id given in the tag <default>. If no <default> tag is present, the first button will have focus. The button look is defined by the textures given to it. If no textures are given, then the main button scroller's textures (<texturefocus> and <texturenofocus>) are used.

Available Tags

id

This attribute specifies the buttons id. This should be a unique value between 1 and 200, as it is used by XBMC to track which button is currently focused, for use with the ButtonScroller.HasFocus(id) visibility condition.

label The label used on the button. It can be a link into strings.xml, or an actual text label.
info

The info label used for the button label. Overrides the <label> tag if both are present and the information produces a non-empty string.

onclick

Specifies the action to perform when the button is pressed. Should be a built in function

texturefocus Specifies the image file which should be displayed when the button has focus. If this tag is missing, the main ButtonScroller's <texturefocus> tag will be used.
texturenofocus Specifies the image file which should be displayed when the button does not have focus. If this tag is missing, the main ButtonScroller's <texturenofocus> tag will be used.

Spin Control

The spin control is used for when a list of options can be chosen (such as a page up/down control). You can choose the position, size, and look of the spin control.

Example

<control type="spincontrol" id="14">
      <description>My first spin control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <visible>true</visible>
      <colordiffuse>FFFFFFFF</colordiffuse>
      <textureup>myuptexture.png</textureup>
      <textureupfocus>myupfocustexture.png</textureupfocus>
      <texturedown>mydowntexture.png</texturedown>
      <texturedownfocus>mydownfocustexture.png</texturedownfocus>
      <subtype>page</subtype>
      <font>font12</font>
      <textcolor>FFFFFFFF</textcolor>
      <disabledcolor>80FFFFFF</disabledcolor>
      <align></align>
      <aligny></aligny>
      <textoffsetx></textoffsetx>
      <textoffsety></textoffsety>
      <pulseonselect></pulseonselect>
      <onup>2</onup>
      <ondown>3</ondown>
      <onleft>1</onleft>
      <onright>1</onright>
</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.

textureup

Specifies the image file which should be displayed for the up arrow when it doesn't have focus. See here for additional information about textures.

textureupfocus Specifies the image file which should be displayed for the up button when it has focus.
texturedown Specifies the image file which should be displayed for the down button when it is not focused.
texturedownfocus Specifies the image file which should be displayed for the down button when it has focus.
font Font used for the button label. From fonts.xml.
textcolor Color used for displaying the label. In AARRGGBB hex format, or a name from the colour theme..
disabledcolor Color used for the label if the control is disabled. In AARRGGBB hex format, or a name from the colour theme.
shadowcolor Specifies the color of the drop shadow on the text. In AARRGGBB format, or a name from the colour theme.
subtype Defines what type of information the spinner holds. Can be int, float, text or page. Defaults to text. Make sure you use page for a page control.
align Label horizontal alignment on the control. Defaults to right, can also be left.
aligny Label vertical alignment on the control. Defaults to top, can also be center.
textoffsetx Amount to offset the label from the left (or right) edge of the button when using left or right alignment.
textoffsety Amount to offset the label from the top edge of the button when using top alignment.

Settings Spin Control

The settings spin control is used in the settings screens for when a list of options can be chosen from using up/down arrows. You can choose the position, size, and look of the spin control. It is basically a cross between the button control and a spin control. It has a label and focus and non focus textures, as well as a spin control on the right.

Example

<control type="spincontrolex" id="12">
      <description>My first settings spin control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <visible>true</visible>
      <colordiffuse>FFFFFFFF</colordiffuse>
      <texturefocus>myfocustexture.png</texturefocus>
      <texturenofocus>mynofocustexture.png</texturenofocus>
      <textureup>myuptexture.png</textureup>
      <textureupfocus>myupfocustexture.png</textureupfocus>
      <texturedown>mydowntexture.png</texturedown>
      <texturedownfocus>mydownfocustexture.png</texturedownfocus>
      <label>46</label>
      <font>font12</font>
      <textcolor>FFFFFFFF</textcolor>
      <disabledcolor>80FFFFFF</disabledcolor>
      <align></align>
      <aligny></aligny>
      <textoffsetx></textoffsetx>
      <textoffsety></textoffsety>
      <pulseonselect></pulseonselect>
      <onup>2</onup>
      <ondown>3</ondown>
      <onleft>1</onleft>
      <onright>1</onright>
</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.

texturefocus

Specifies the image file which should be displayed for the control when it has focus. See here for additional information about textures.

texturenofocus Specifies the image file which should be displayed for the control when it doesn't focus.
textureup Specifies the image file which should be displayed for the up arrow when it doesn't have focus. It is displayed to the left of the down arrow.
textureupfocus Specifies the image file which should be displayed for the up arrow when it has focus.
texturedown Specifies the image file which should be displayed for the down arrow when it is not focused. It is displayed to the right of the up arrow so that it's right edge is <textoffsetx> pixels away from the right edge of the control.
texturedownfocus Specifies the image file which should be displayed for the down arrow when it has focus.
label Either a numeric reference into strings.xml (for localization), or a string that will be shown on the left of the control.
font Font used for the controls label. From fonts.xml.
textcolor Color used for displaying the label. In AARRGGBB hex format, or a name from the colour theme.
disabledcolor Color used for the label if the control is disabled. In AARRGGBB hex format, or a name from the colour theme.
shadowcolor Specifies the color of the drop shadow on the text. In AARRGGBB hex format, or a name from the colour theme.
align Label horizontal alignment on the control. Defaults to left.
aligny Label vertical alignment on the control. Defaults to top, can also be center.
textoffsetx Amount to offset the label from the left (or right) edge of the button when using left or right alignment.
textoffsety Amount to offset the label from the top edge of the button when using top alignment.

Slider Control

The slider control is used for things where a sliding bar best represents the operation at hand (such as a volume control or seek control). You can choose the position, size, and look of the slider control.

Example

<control type="slider" id="17">
      <description>My first slider control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>30</height>
      <visible>true</visible>
      <texturebg>mybackgroundtexture.png</texturebg>
      <textureslidernib>mydowntexture.png</textureslidernib>
      <textureslidernibfocus>mydownfocustexture.png</textureslidernibfocus>
      <info></info>
      <controloffsetx></controloffsetx>
      <controloffsety></controloffsety>
      <pulseonselect></pulseonselect>
      <onup>2</onup>
      <ondown>3</ondown>
      <onleft>1</onleft>
      <onright>1</onright>
</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.

texturebg

Specifies the image file which should be displayed in the background of the slider control. See here for additional information about textures.

textureslidernib Specifies the image file which should be displayed for the slider nib.
textureslidernibfocus Specifies the image file which should be displayed for the slider nib when it has focus.
controloffsetx Amount to offset the slider background texture from the left edge of the control. Only useful if a value is being rendered as well (ie in int or float mode).
controloffsety Amount to offset the slider background texture from the top edge of the control.
info

Specifies the information that the slider controls. See here for more information.

List Container

The list container is one of several containers used to display items from file lists in various ways. The list container is very flexible - it's only restriction is that it is a list - i.e. a single column or row of items. The layout of the items is very flexible and is up to the skinner.

Example

<control type="list" id="50">
      <description>My first list container</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <visible>true</visible>
      <onup>2</onup>
      <ondown>3</ondown>
      <onleft>1</onleft>
      <onright>1</onright>
      <viewtype label="3D list">list</viewtype>
      <orientation>vertical</orientation>
      <pagecontrol>25</pagecontrol>
      <scrolltime>200</scrolltime>
      <itemlayout width="250" height="29">
		<control type="image">
			<posx>5</posx>
			<posy>3</posy>
			<width>22</width>
			<height>22</height>
			<info>ListItem.Icon</info>
		</control>
		<control type="label">
			<posx>30</posx>
			<posy>3</posy>
			<width>430</width>
			<height>22</height>
			<font>font13</font>
			<aligny>center</aligny>
			<selectedcolor>green</selectedcolor>
			<align>left</align>
			<info>ListItem.Label</info>
		</control>
		<control type="label">
			<posx>475</posx>
			<posy>3</posy>
			<width>300</width>
			<height>22</height>
			<font>font13</font>
			<aligny>center</aligny>
			<selectedcolor>green</selectedcolor>
			<textcolor>grey</textcolor>
			<align>right</align>
			<info>ListItem.Label2</info>
		</control>
      </itemlayout>
      <focusedlayout height="29" width="250">
		<control type="image">
			<width>485</width>
			<height>29</height>
			<posx>0</posx>
			<posy>0</posy>
			<visible>Control.HasFocus(50)</visible>
			<texture>list-focus.png</texture>
		</control>
		<control type="image">
			<posx>5</posx>
			<posy>3</posy>
			<width>22</width>
			<height>22</height>
			<info>ListItem.Icon</info>
		</control>
		<control type="label">
			<posx>30</posx>
			<posy>3</posy>
			<width>430</width>
			<height>22</height>
			<font>font13</font>
			<aligny>center</aligny>
			<selectedcolor>green</selectedcolor>
			<align>left</align>
			<info>ListItem.Label</info>
		</control>
		<control type="label">
			<posx>475</posx>
			<posy>3</posy>
			<width>300</width>
			<height>22</height>
			<font>font13</font>
			<aligny>center</aligny>
			<selectedcolor>green</selectedcolor>
			<textcolor>grey</textcolor>
			<align>right</align>
			<info>ListItem.Label2</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, and bigwrap. 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 list. Defaults to vertical.
pagecontrol Used to set the <id> of the page control used to control this list.
scrolltime The time (in ms) to scroll from one item to another. By default, this is 200ms. The list will scroll smoothly from one item to another as needed. Set it to zero to disable the smooth scrolling.
itemlayout Specifies the layout of items in the list. Requires the height attribute set in a vertical list, and the width attribute set for a horizontal list. 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 the height attribute set in a vertical list, and the width attribute set for a horizontal list. 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 list will contain. Allows the skinner to setup a list 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

Wraplist Container

The wrap list container is one of several containers used to display items from file lists in various ways. The wrap list container is the same as the List Container, with two exceptions: 1. The focused item is fixed. 2. The items "wrap" around once they reach the end. As with all container controls, the layout of the items within the control is very flexible.

Example

<control type="wraplist" id="50">
      <description>My first wraplist container</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <visible>true</visible>
      <onup>2</onup>
      <ondown>3</ondown>
      <onleft>1</onleft>
      <onright>1</onright>
      <viewtype label="3D list">list</viewtype>
      <orientation>vertical</orientation>
      <pagecontrol>25</pagecontrol>
      <focusposition>3</focusposition>
      <scrolltime>200</scrolltime>
      <itemlayout width="250" height="29">
		<control type="image">
			<posx>5</posx>
			<posy>3</posy>
			<width>22</width>
			<height>22</height>
			<info>ListItem.Icon</info>
		</control>
		<control type="label">
			<posx>30</posx>
			<posy>3</posy>
			<width>430</width>
			<height>22</height>
			<font>font13</font>
			<aligny>center</aligny>
			<selectedcolor>green</selectedcolor>
			<align>left</align>
			<info>ListItem.Label</info>
		</control>
		<control type="label">
			<posx>475</posx>
			<posy>3</posy>
			<width>300</width>
			<height>22</height>
			<font>font13</font>
			<aligny>center</aligny>
			<selectedcolor>green</selectedcolor>
			<textcolor>grey</textcolor>
			<align>right</align>
			<info>ListItem.Label2</info>
		</control>
      </itemlayout>
      <focusedlayout height="29" width="250">
		<control type="image">
			<width>485</width>
			<height>29</height>
			<posx>0</posx>
			<posy>0</posy>
			<visible>Control.HasFocus(50)</visible>
			<texture>list-focus.png</texture>
		</control>
		<control type="image">
			<posx>5</posx>
			<posy>3</posy>
			<width>22</width>
			<height>22</height>
			<info>ListItem.Icon</info>
		</control>
		<control type="label">
			<posx>30</posx>
			<posy>3</posy>
			<width>430</width>
			<height>22</height>
			<font>font13</font>
			<aligny>center</aligny>
			<selectedcolor>green</selectedcolor>
			<align>left</align>
			<info>ListItem.Label</info>
		</control>
		<control type="label">
			<posx>475</posx>
			<posy>3</posy>
			<width>300</width>
			<height>22</height>
			<font>font13</font>
			<aligny>center</aligny>
			<selectedcolor>green</selectedcolor>
			<textcolor>grey</textcolor>
			<align>right</align>
			<info>ListItem.Label2</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, and bigwrap. 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 list. Defaults to vertical.
pagecontrol Used to set the <id> of the page control used to control this list.
scrolltime The time (in ms) to scroll from one item to another. By default, this is 200ms. The list will scroll smoothly from one item to another as needed. Set it to zero to disable the smooth scrolling.
focusedposition Specifies the index (from 0 -> number items displayable - 1) of the focused item. The focused item doesn't move - as the user moves up and down (or left and right) the items scroll instead.
itemlayout Specifies the layout of items in the list. Requires the height attribute set in a vertical list, and the width attribute set for a horizontal list. 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 the height attribute set in a vertical list, and the width attribute set for a horizontal list. 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 list will contain. Allows the skinner to setup a list anywhere they want with a static set of content, as a useful alternative to the grouplist control. See here for more information

FixedList Container

The fixed list container is one of several containers used to display items from file lists in various ways. The fixed list container is the same as the List Container, with one exceptions: 1. The focused item is fixed, thus moving up or down scrolls the items, not the focused position. As with all container controls, the layout of the items within the control is very flexible.

    <control type="fixedlist" id="50">
          <description>My first fixed list container</description>
          <posx>80</posx>
          <posy>60</posy>
          <width>250</width>
          <height>200</height>
          <visible>true</visible>
          <onup>2</onup>
          <ondown>3</ondown>
          <onleft>1</onleft>
          <onright>1</onright>
          <viewtype label="3D list">list</viewtype>
          <orientation>vertical</orientation>
          <pagecontrol>25</pagecontrol>
          <scrolltime>200</scrolltime>
          <focusposition>4</focusposition>
          <itemlayout width="250" height="29">
                    <control type="image">
                            <posx>5</posx>
                            <posy>3</posy>
                            <width>22</width>
                            <height>22</height>
                            <info>ListItem.Icon</info>
                    </control>
                    <control type="label">
                            <posx>30</posx>
                            <posy>3</posy>
                            <width>430</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <align>left</align>
                            <info>ListItem.Label</info>
                    </control>
                    <control type="label">
                            <posx>475</posx>
                            <posy>3</posy>
                            <width>300</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <textcolor>grey</textcolor>
                            <align>right</align>
                            <info>ListItem.Label2</info>
                    </control>
          </itemlayout>
          <focusedlayout height="29" width="250">
                    <control type="image">
                            <width>485</width>
                            <height>29</height>
                            <posx>0</posx>
                            <posy>0</posy>
                            <visible>Control.HasFocus(50)</visible>
                            <texture>list-focus.png</texture>
                    </control>
                    <control type="image">
                            <posx>5</posx>
                            <posy>3</posy>
                            <width>22</width>
                            <height>22</height>
                            <info>ListItem.Icon</info>
                    </control>
                    <control type="label">
                            <posx>30</posx>
                            <posy>3</posy>
                            <width>430</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <align>left</align>
                            <info>ListItem.Label</info>
                    </control>
                    <control type="label">
                            <posx>475</posx>
                            <posy>3</posy>
                            <width>300</width>
                            <height>22</height>
                            <font>font13</font>
                            <aligny>center</aligny>
                            <selectedcolor>green</selectedcolor>
                            <textcolor>grey</textcolor>
                            <align>right</align>
                            <info>ListItem.Label2</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, and bigwrap. 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 list. Defaults to vertical.
pagecontrol Used to set the <id> of the page control used to control this list.
scrolltime The time (in ms) to scroll from one item to another. By default, this is 200ms. The list will scroll smoothly from one item to another as needed. Set it to zero to disable the smooth scrolling.
focusposition Specifies the focus position (from 0 -> number of displayable items - 1). The focused position doesn't change - instead, the items move up or down (or left and right) as focus changes.
itemlayout Specifies the layout of items in the list. Requires the height attribute set in a vertical list, and the width attribute set for a horizontal list. 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 the height attribute set in a vertical list, and the width attribute set for a horizontal list. 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 list will contain. Allows the skinner to setup a list 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

Panel Container

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>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, and bigwrap. 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.
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

Text Box

The text box is used for showing a large multipage piece of text in XBMC. You can choose the position, size, and look of the text.

Example

<control type="textbox" id="2">
      <description>My first text box control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <visible>true</visible>
      <colordiffuse>FFFFFFFF</colordiffuse>
      <font>font13</font>
      <textcolor>FFFFFFFF</textcolor>
      <pulseonselect></pulseonselect>
      <pagecontrol>13</pagecontrol>
      <autoscroll delay="3000" time="1000" repeat="10000">!Control.HasFocus(13)</autoscroll>
</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.

font Font used for the items first label. From fonts.xml.
textcolor Color used for displaying the text. In AARRGGBB hex format, or a name from the colour theme.
shadowcolor Specifies the color of the drop shadow on the text. In AARRGGBB format, or a name from the colour theme.
pagecontrol Specifies the <id> of the page control used to control this textbox. The page control can either be a Spin Control or a Scroll Bar Control.
autoscroll Specifies the timing and conditions of any autoscrolling this textbox should have. Times are in milliseconds. The content is delayed for the given delay, then scrolls at a rate of one line per time interval until the end. If the repeat tag is present, it then delays for the repeat time, fades out over 1 second, and repeats. It does not wrap or reset to the top at the end of the scroll. You can use any bool condition to specify when autoscrolling should be allowed.

RSS feed Control

The rss control is used for displaying scrolling RSS feeds from the internet in XBMC. You can choose the font, size, colour, location and the RSS feed to be displayed.

Note: Don't confuse RSS feed Control with RSS Feeds which allows you to view/listen to online video/audio/picture streams.

Example

 <control type="rss" id="1">
      <description>My First RSS control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>500</width>
      <visible>true</visible>
      <font>font14</font>
      <textcolor>FFB2D4F5</textcolor>
      <headlinecolor>FFFFFFFF</headlinecolor>
      <titlecolor>FF655656</titlecolor>
      <urlset>1</urlset>
 </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.

font Specifies the font to use from the font.xml file.
textcolor Specified the color the text should be. In hex AARRGGBB format, or a name from the colour theme.
shadowcolor Specifies the color of the drop shadow on the text. In AARRGGBB format, or a name from the colour theme.
highlightcolor Specified the color that any highlighted text should be. In hex AARRGGBB format, or a name from the colour theme.
titlecolor Specified the color the titles of the feeds should be. In hex AARRGGBB format, or a name from the colour theme.
urlset The actual RSS feedset to use. This is an id reference to the <rss> section in RssFeeds.xml:
scrollspeed Scroll speed of text in pixels per second.
 <rssfeeds>
   <set id="1">
     <feed updateinterval="30">http://feeds.feedburner.com/XboxScene</feed>
     <feed updateinterval="30">http://feeds.wired.com/wired/topheadlines</feed>
   </set>
   <set id="2">
     <feed updateinterval="30">http://www.cnet.co.uk/feeds/public/rss_news_10.htm</feed>
   </set>
 </rssfeeds>

Each feedset has an id attribute – this is what we are referencing in the <urlset> parameter. As can be seen, there can be more than one <set> defined, and more than one <feed> per set. The <feed>'s must be escaped so that they're xml-safe (ie replace & with & etc.). Each feed in the set runs through in the order they are defined. HOW-TO: Change RSS feeds and more info on RSS feeds|More information about RSS feeds can be found here.

Visualisation Control

The visualisation control is used for displaying those funky patterns that jump to the music in XBMC. You can choose the position, and size of the visualisation displayed. Note that the control is only rendered if music is being played.

Example

<control type="visualisation" id ="3">
      <description>My first visualisation control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <visible>true</visible>
</control>

Available Tags

Only the default control tags are applicable to this control.

Video Control

The video control is used for displaying the currently playing video elsewhere in the XBMC GUI. You can choose the position, and size of the video displayed. Note that the control is only rendered if video is being played.

Example

<control type="videowindow" id="2">
      <description>My first video control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <visible>true</visible>
</control>

Available Tags

Only the default control tags are applicable to this control.

Mover Control

The mover control is used for the screen calibration portions of XBMC. You can choose the size and look of the mover control.

Example

<control type="mover" id="3">
      <description>My first mover control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <texturefocus>mytexture.png</texturefocus>
      <texturenofocus>mytexture.png</texturenofocus>
      <pulseonselect>true</pulseonselect>
</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.

texturefocus

Specifies the image file which should be displayed when the mover has focus. See here for additional information about textures.

texturenofocus Specifies the image file which should be displayed when the mover does not have focus.

Resize Control

The resize control is used to specify an area of changeable ratio for use in the screen calibration portion of XBMC. You can choose the size, and look of the resizer.

Example

<control type="resize" id="3">
      <description>My first resize control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <texturefocus>mytexture.png</texturefocus>
      <texturenofocus>mytexture.png</texturenofocus>
      <pulseonselect>true</pulseonselect>
</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.

texturefocus

Specifies the image file which should be displayed when the resizer has focus. See here for additional information about textures.

texturenofocus Specifies the image file which should be displayed when the resizer does not have focus.

Console Control

used to display the last few items added to the video database.

Conditional_Visibility

XBMC's skinning engine versatility is based apon the fact that the skinner can display and hide portions of the skin using a variety of conditional statements that can be combined to create very user friendly UI implimentations. For further information of available variable and how they can be applied.

Using the <visible> tag for controls in your skin

Introduction

Recently, we've been modularising much of the code that controls when items should be rendered, and when they should be left as-is.

All controls can now benefit from “conditional visibility” support. This means that, instead of specifying just “yes” or “no” for the <visible> tag, you can now provide one of the many preset boolean conditions. Not only that, you can also specify how XBMC should transistion between a visible state and a hidden state.

For example, the Project Mayhem 3 skin has <visible>!Player.HasMedia</visible> tags on all the background images on the home page. The reason is that we don't want the images being displayed while a media file (audio or video) is playing or paused, as the video or visualisation will cover the images anyway, so they only take up memory unnecessarily. They also slow down navigation, as the need to be loaded/unloaded depending on whether they are visible (ie whether or not the user has a particular button focused).

How They Work

The condition given in the <visible> tag is evaluated at during the control's Render() function. XBMC decides whether or not the condition is true, and updates the control's visibility accordingly. Thus, it all happens without XBMC having to do the extra chores of maintaining which controls need to be shown at which points in time. The controls automatically update themselves.

Conditional Visibility for Dialogs

Dialogs can also be made to popup automatically based on a visibility condition. This is done by supplying the <visible> tag at the top of the window file (where the <id>, <type> and <coordinate> tags are). XBMC once again evaluates this visibility at render time, and if needbe, will create and show the dialog at the appropriate time. It'll also close them once that visibility has vanished.

This only works with dialogs. For custom windows, you can specify the type of window you require by specifying it using the <type> tag. For more information see the window .xml structure page.

List of Boolean Conditions

Combining Conditions

You can combine two (or more) of the above settings by using "+" as an AND operator, "|" as an OR operator, “!" as a NOT operator, and "[" and "]" to bracket expressions. For example, <visible>Player.HasVideo + Player.Rewinding8x</visible> will only show the control when the player is rewinding a video at 8x, whereas <visible>Player.HasVideo | Player.IsRecording</visible> will show the control if a video is playing, or if we are recording something. The AND operator takes precedence over the OR operator when evaluating the logic, and operators are read from left to right. So if you want to show something when condition1 OR condition2 is true AND condition3 is true, you can do:

<visible>[condition1 | condition2] + condition3</visible>

Note that if you missed the brackets, then it would actually be reading «if condition1 or (condition2 and condition3)" due to AND taking precedence over OR.

Some pointers on boolean logic:

The following holds true:

A + (B | C) = A + B| A + C
A | (B + C) = (A | B) + (A | C)

!(A + B) =! A |! B
!(A | B) =! A +! B

A common mistake is to do something like this:

! A |! B |! C

This is false only if A, B and C are all simultaneously true (as it's the same as !(A + B + C)), and you may have possibly been after

! A +! B +! C

which is false if A is true, or B is true, or C is true.

One thing you will notice, is that when a control is hidden, it can't be focused. This means you can't move to a control and have it automatically become visible (eg even if it had Control.HasFocus(myID) it wouldn't come back on, as XBMC wouldn't allow navigation to the hidden control). To solve this issue, you can use:

  <visible allowhiddenfocus="true">Control.HasFocus(21)</visible>

on a control of <id> 21. This will allow the control to be focusable even when it's hidden. When the user moves to the hidden control, it will automatically unhide itself, due to the Control.HasFocus(21) visibility condition.

Specifying the Transition Animation

You can also specify how XBMC renders the transistion between the hidden and visible states (as well as between other states). See here for how to add animations to your skin.

Animating Your Skin

The XBMC skinning engine supports animations of any control allowing them to rotate, slide, fade or any combination there-of. Combining animations with conditional statements ensure your skin will have stunning effects that appear as professional as a 1st party product.

About Skin Animations

The XBMC skin engine has support for animations between control and window states. The animations are defined through use of the <animation> tag, which has a defined type and various attributes that specify the animation to be performed. All animations are additive – if two of them are in effect at the same time, their effects are added together. You may also have more than one animation of each type.

Window Animations

There are two valid window animation – the animation to perform when the window is opened, and the animation to perform when the window is closed. They take the same format as the control animations. You can, however, have more than one animation performed for the windowopen or windowclose animation.

Control Animations

There are 6 valid control animations: WindowOpen, WindowClose, Visible, Hidden, Focus, and Unfocus. There is also a combination animation VisibleChange that constructs the Visible animation, then reverses it for the Hidden animation.

Format of Animation Tags

The animation tag is formatted as follows for a single animation:

<animation effect="EFFECT" attributes>TYPE</animation>

and as follows for multiple animations:

<animation type="TYPE" condition="Window.IsActive(Home)" reversible="false">
  <effect type="EFFECT" other_attributes />
   ...
  <effect type="EFFECT" other_attributes />
</animation>

Types

The type can be one of the following:

WindowOpen
Performed once only when the window is opened.
WindowClose
Performed once only when the window is closed. No animation is performed when switching to fullscreen video, however.
Visible
Performed when the control becomes visible via its <visible> tag.
Hidden
Performed when the control becomes hidden via its <visible> tag.
Focus
Performed when the control gains focus.
Unfocus
Performed when the control loses focus.
Conditional
Performed when the control's condition attribute is filled.
VisibleChange
The same as the Visible type, except the reverse animation is auto-created for the Hidden type. Just saves having to have both animations if the animation is the same in both directions (ie just reversed)

Attributes

The attributes available are as follows. Note that all attributes, like tags, are case sensitive

effect
Specifies the effect to use. Currently “fade”, “slide”, “rotate”, "rotatex", "rotatey", and “zoom” are supported.
rotatex - rotates a control around the X-Axis (horizontal)
rotatey - rotates a control around the Y-Axis (vertical)
rotate - rotates a control around the Z-Axis
time

Specifies the length of time that the animation will run, in milliseconds.

delay
The time to delay the transistion before starting it, in milliseconds.
start
The start state of the control for this transistion.
  • For fades, this is the opaqueness as a percentage (ie start="100" is fully opaque, start="0" is fully transparent.
  • For slides, this is the relative coordinate offset to start the control at (ie start="50,60" will start the control off at 50 pixels to the right, and 60 pixels below it's normal viewing position.
  • For rotates, this is the starting degree offset from the horizontal. (ie start="30" will start the control off on an angle of 30 degrees from the horizontal).
  • For zooms, this is the starting size as a percentage. (ie start="50,60" will start the control at 50% of it's horizontal size and 60% of it's vertical size).
Note: With zooms you can also specify the coordinates and dimensions of the texture. (ie start="posx,posy,width,height").
end
The end state of the control for this transistion. Similar to the start state, except that the end state is always kept after the animation is finished, and until the control changes its state.
acceleration
Amount to accelerate or decelerate during a “slide”, “zoom” or “rotate” transistion. For deceleration, use a negative value. A value of -1 will cause the control to come to rest at its end coordinates. Defaults to 0. (Also see the tween attribute)
center
Center of the rotation or zoom to perform with a “rotate” or “zoom” transistion. This is the coordinates about which the rotation or zoom will take place. eg center="30,50” will mean that all points will revolve around (or zoom from) the (30,50) pixel location. You can set center="auto" to have XBMC automatically zoom from the center of the control.
Center shifts the rotational axis at the level, rotatex - center="y,z" coordinates, rotatey - center="x,z" coordinates, rotate - center="x,y" coordinates
condition
The conditions under which this animation should be performed. Defaults to being always performed. See here for a list of valid conditionals.
reversible
If “false” the animation is not reversed if it is interrupted when it is finished. For instance a Visible animation will normally be reversed (instead of running the Hidden animation) if the control becomes hidden before the visible animation has finished. Setting reversible="false” prevents this behaviour (the Hidden animation will take its place). Defaults to true.
loop
If “true” will make your fade animation loop. (jump back to the start after it reaches the end)
pulse
If “true” will make your fade animation pulse. (Bounce back from start to end to start to end .........)
tween
Tween is like an advanced acceleration attribute that can be applied to all animations. Instead of a steady acceleration or deceleration, you can specify curves that the animation should follow. Currently, the engine supports “elastic“, “bounce“, “circle“, “back“, “sine“, “cubic“, “quadratic“ and, the default, “linear“. More information about Tweeners
easing
Easing basically defines the direction of the tween and can be one of “out“, “inout“ and “in“. The default value is “out“. More information about Easing

Examples

<visible>Player.HasAudio</visible>
<animation effect="fade" time="400">VisibleChange</animation>

This causes XBMC to fade the control in 400 milliseconds between the visible and hidden states. The control will start off hidden, and will fade in over 400ms when you play audio, and when it's finished, it will fade out again over 400ms.


You can also specify different transistion times for transistioning in and out as follows:

<animation effect="fade" time="100">WindowOpen</animation>
<animation effect="fade" time="1000">WindowClose</animation>


This, when used as the animation tag for the ~MusicOSD dialog, will cause it to fade in quickly (in 100ms) when activated and the fade out again slowly (in 1 second (1000ms)) when it's cancelled.


You can also specify that a control should always fade in when the window is opened by using

<animation effect="fade" time="200">WindowOpen</animation>

This specifies that it will always start hidden, but will fade in immediately (over a time of 200ms) when the window is opened.


There is also ability to add delays preceding the transistions. For instance

<animation effect="fade" time="200" delay="200">Hidden</animation>

would mean that the control will fade out after a delay of 200ms. This is useful for "crossfade" effects, where you want the new control to fade in while the old control is still on screen (and then fade the old one out once the new one is completely opaque).


There are also slide effects available.

<animation effect="slide" end="30,0" time="200">Focus</animation>

will slide the control 30 pixels to the right of its normal position when it becomes focused. Note that when it becomes unfocused it will jump back to it's normal position. A Unfocus animation will make it slide back gracefully.


There are also rotate effects available.

<animation effect="rotate" end="30" center="360,288" time="200">Focus</animation>

will rotate the control 30 degrees counter clockwise about the center of a PAL screen (360,288) when the control becomes focused.


And we also have zoom effects.

<animation effect="zoom" end="120" center="360,288" time="200">Focus</animation>

will zoom the control to 120% of its normal size when the control becomes focused, with the zoom centered at the center of a PAL screen (360,288). You can zoom each dimension by different amounts (effectively a stretch operation) as well. To stretch a control an extra 50% horizontally when focused, we can use

<animation effect="zoom" end="150,100" center="360,288" time="200">Focus</animation>

An example of a condition attribute is:

<animation effect="slide" start="-120,0" time="200" condition="Window.Previous(Home)">WindowOpen</animation>

This will cause the slide animation to only be performed if you are coming to this window from the Home window.


An example of a Conditional animation type is:

<animation effect="slide" start="-120,0" time="200" condition="Control.HasFocus(2)">Conditional</animation>

This will cause the slide animation to only be performed when the control with the id of 2 gains focus.


An example of a fade animation with a pulse:

<animation effect="fade" start="20" time="200" condition="Control.HasFocus(2)" pulse="true">Conditional</animation>

This will cause the control to start at 20% opacity and fade to full in 200 milliseconds and fade back to 20% opacity and keeping looping in that fashion


An example of two animations at once:

<animation type="WindowOpen">
 <effect type="fade" start="0" end="100" time="200"/>
 <effect type="zoom" end="150,100" center="auto" time="200" delay="200"/>
</animation>

This will cause the control to fade in over 200 ms, then zoom to 150% it's width from the center of the control.

Fonts

XBMC allows you to customize which fonts are displayed onscreen in the User Interface. There's one special file called font.xml. This file contains a list of all fonts the skin uses. XBMC will load all the fonts mentioned in this file from the /myskin/fonts directory first, and if that fails, will attempt to load them from XBMC/media/fonts. In the event that XBMC is unable to locate the specified font, it will default to "font13". You can modify this file as you like and add/delete/change fonts. The user friendly font name is referenced by the other xml files mentioned below.

Format of the Font.xml File

The font.xml file is divided into font sets, which includes a set of fonts used by the skin. Every font set must contain the same font names in order for the skin to work with all font sets.

<code>
  <fontset id="Latin" unicode="false">
      <font>
       ....
      </font>
      <font>
      ....
      </font>
      ....
  </fontset>
  <fontset id="Arial" unicode="true">
      <font>
      ....
      </font>
      ....
  </fontset>
</code>

A font set has the following attributes:

id
Name of the font set. Displayed to the user. Can have any value.
unicode
Whether or not a font set supports unicode characters. Supported values are “true” or “false”

There has to be at least one font set with the unicode attribute set to true else languages like Chinese or Korean will not display properly. There is a font called Arialuni.TTF with a size of 20MB. It is a unicode True Type Font and works with all languages xbmc supports.


Note: XBMC will automatically switch to the first available unicode font set if the user selects a language that needs one. This switch will not be made if the currently loaded font set already supports unicode.

Supported Font Types

Bitmap Fonts

Bitmap fonts must have a .xpr suffix. Instructions for how to generate them will follow. Example:

  <font>
     <name>font12</name>
     <filename>myfont12.xpr</filename>
  </font>

How to Generate XPR Font Files

To generate XPR fonts, you require the programs “FontMaker" and “Bundler” from the Xbox Developers Kit. The steps required are as follows:

  • Load FontMaker.
  • Load in the Truetype font of the size you wish to convert to XPR.
  • Apply any styles (outline, bold, italics, shadow etc.) that you wish the font to have.
  • Select the range of characters (Glyphs) that you want the font to contain.
  • Size the output texture so that all the characters are displayed.
  • Save the fonts. This will create a .tga and .abc file (eg Arial_24.tga and Arial_24.abc)
  • Create a text file in the same folder as your font files from 6 with the following content.
  Texture Font
  {
	  Source Arial_24.tga
	  Format D3DFMT_A4R4G4B4
	  Levels 1
  }
  UserData FontData
  {
  	DataFile Arial_24.abc
  }
  • Open a command prompt, and cd to the folder containing your font files.
  • Run “Bundler Arial_24.txt" to create Arial_24.xpr.

As a second option, you can download the Media X Menu Accessory “Font Bundle” (from the Usual Places).

1. Run Font Bundle. 2. Click the “Font Maker” button and follow the above Font Maker instructions to create your font(s). 3. Click the “Load” button in Font Bundle and select your new font. 4. Click the “Build”.

Your new Font.xpr file should be saved in the same folder as your font files.

True type Fonts

True type fonts must have a .ttf suffix. For a true type font it is possible to define the size (default 20) and a style (normal, bold, italics or bolditalics). Example:

  <font>
     <name>font12</name>
     <filename>arial.ttf</name>
     <size>12</size>
     <style>bold</style>
     <aspect>0.75</aspect>
  </font>

The <aspect> tag specifies the aspect ratio of the font. An aspect of 0.75 means that the width of the font will be 0.75 of the height. By default the aspect is 1.0 for all but the SD 16x9 modes (PAL16x9, NTSC16x9 and 480p16x9) where the aspect ratio is 0.75, due to the stretched pixels.

Apendix I: List of Windows

This table cross-references Window names, Window definitions, Window ID, and the delta Window ID's (this is the delta from the home window.) The code that performs the cross-reference is found in ButtonTranslator.cpp.

  • keymap.xml uses the Window name.
  • XBMC's C++ code uses the Window definitions and Window ID's.
  • skin .xml files use the Delta Window ID's
  • XBMC.ActivateWindow() can use either the Window name, the Window ID, or the delta Window ID.
  • sounds.xml can use the window name or window ID

You can use secondary parameters with all media windows, as can be seen here:

Example:

  • You want a button in your skin or on your remote taking you directly to the movie listing you let that button do
 xbmc.activatewindow(videolibrary,movietitles)


NAME
DEFINITION
WINDOW ID
DELTA WINDOW ID
SOURCE XML FILE
home
WINDOW_HOME
10000
0
Home.xml
programs
WINDOW_PROGRAMS
10001
1
MyPrograms.xml
pictures
WINDOW_PICTURES
10002
2
MyPics.xml
filemanager
WINDOW_FILES
10003
3
FileManager.xml
settings
WINDOW_SETTINGS_MENU
10004
4
Settings.xml
music
WINDOW_MUSIC
10005
5
None – this is just a wrapper for the current My Music view (who's IDs are 501 and 502)
video
WINDOW_VIDEOS
10006
6
None – this is just a wrapper for the current My Video view (who's IDs are 21-25)
systeminfo
WINDOW_SYSTEM_INFORMATION
10007
7
SettingsSystemInfo.xml
guicalibration
WINDOW_UI_CALIBRATION
10010
10
SettingsUICalibration.xml
screencalibration
WINDOW_MOVIE_CALIBRATION
10011
11
SettingsScreenCalibration.xml
picturessettings
WINDOW_SETTINGS_MYPICTURES
10012
12
SettingsCategory.xml
programssettings
WINDOW_SETTINGS_MYPROGRAMS
10013
13
SettingsCategory.xml
weathersettings
WINDOW_SETTINGS_MYWEATHER
10014
14
SettingsCategory.xml
musicsettings
WINDOW_SETTINGS_MYMUSIC
10015
15
SettingsCategory.xml
systemsettings
WINDOW_SETTINGS_SYSTEM
10016
16
SettingsCategory.xml
videossettings
WINDOW_SETTINGS_MYVIDEOS
10017
17
SettingsCategory.xml
networksettings
WINDOW_SETTINGS_NETWORK
10018
18
SettingsCategory.xml
appearancesettings
WINDOW_SETTINGS_APPEARANCE
10019
19
SettingsCategory.xml
scripts
WINDOW_SCRIPTS
10020
20
MyScripts.xml
videolibrary
WINDOW_VIDEO_NAV
10025
25
MyVideoNav.xml - Replaces the following .XML files: MyVideoGenre (WINDOW_VIDEO_GENRE), MyVideoActors (WINDOW_VIDEO_ACTOR), MyVideoYear (WINDOW_VIDEO_YEAR), MyVideoTitle (WINDOW_VIDEO_TITLE)
videofiles
WINDOW_VIDEO_FILES
10024
24
MyVideo.xml
videoplaylist
WINDOW_VIDEO_PLAYLIST
10028
28
MyVideoPlaylist.xml
LoginScreen
WINDOW_LOGINSCREEN
10029
29
LogonScreen.xml
profiles
WINDOW_SETTINGS_PROFILES
10034
34
SettingsProfile.xml
gamesaves
WINDOW_GAMESAVES
10035
35
MyGameSaves.xml
yesnodialog
WINDOW_DIALOG_YES_NO
10100
100
DialogYesNo.xml
progressdialog
WINDOW_DIALOG_PROGRESS
10101
101
DialogProgress.xml
invitedialog
WINDOW_DIALOG_INVITE
10102
102
DialogInvite.xml
virtualkeyboard
WINDOW_DIALOG_KEYBOARD
10103
103
DialogKeyboard.xml
volumebar
WINDOW_DIALOG_VOLUME_BAR
10104
104
DialogVolumeBar.xml
submenu
WINDOW_DIALOG_SUB_MENU
10105
105
DialogSubMenu.xml
contextmenu
WINDOW_DIALOG_CONTEXT_MENU
10106
106
DialogContextMenu.xml
infodialog
WINDOW_DIALOG_KAI_TOAST
10107
107
DialogKaiToast.xml
hostdialog
WINDOW_DIALOG_HOST
10108
108
DialogHost.xml
numericinput
WINDOW_DIALOG_NUMERIC
10109
109
DialogNumeric.xml
gamepadinput
WINDOW_DIALOG_GAMEPAD
10110
110
DialogGamepad.xml
shutdownmenu
WINDOW_DIALOG_BUTTON_MENU
10111
111
DialogButtonMenu.xml
scandialog
WINDOW_DIALOG_MUSIC_SCAN
10112
112
DialogMusicScan.xml
mutebug
WINDOW_DIALOG_MUTE_BUG
10113
113
DialogMuteBug.xml
playercontrols
WINDOW_DIALOG_PLAYER_CONTROLS
10114
114
PlayerControls.xml
seekbar
WINDOW_DIALOG_SEEK_BAR
10115
115
DialogSeekBar.xml
musicosd
WINDOW_DIALOG_MUSIC_OSD
10120
120
MusicOSD.xml
visualisationsettings
WINDOW_DIALOG_VIS_SETTINGS
10121
121
MusicOSDVisSettings.xml
visualisationpresetlist
WINDOW_DIALOG_VIS_PRESET_LIST
10122
122
VisualizationPresetList.xml
osdvideosettings
WINDOW_DIALOG_VIDEO_OSD_SETTINGS
10123
123
VideoOSDSettings.xml
osdaudiosettings
WINDOW_DIALOG_AUDIO_OSD_SETTINGS
10124
124
VideoOSDSettings.xml
Video Bookmarks
WINDOW_DIALOG_VIDEO_BOOKMARKS
10125
125
VideoOSDBookmarks.xml
File Browser
WINDOW_DIALOG_FILE_BROWSER
10126
126
FileBrowser.xml
trainersettings
WINDOW_DIALOG_TRAINER_SETTINGS
10127
127
TrainerSettings.xml
networksetup
WINDOW_DIALOG_NETWORK_SETUP
10128
128
DialogNetworkSetup.xml
mediasource
WINDOW_DIALOG_MEDIA_SOURCE
10129
129
DialogMediaSource.xml
ProfileSettings
WINDOW_PROFILE_SETTINGS
10130
130
ProfileSettings.xml
LockSettings
WINDOW_LOCK_SETTINGS
10131
131
LockSettings.xml
contentsettings
WINDOW_DIALOG_CONTENT_SETTINGS
10132
132
DialogContentSettings.xml
scandialog
WINDOW_DIALOG_VIDEO_SCAN
10133
133
DialogVideoScan.xml
favourites
WINDOW_DIALOG_FAVOURITES
10134
134
DialogFavourites.xml
songinformation
WINDOW_DIALOG_SONG_INFO
10135
135
DialogSongInfo.xml
smartplaylisteditor
WINDOW_DIALOG_SMART_PLAYLIST_EDITOR
10136
136
SmartPlaylistEditor.xml
smartplaylistrule
WINDOW_DIALOG_SMART_PLAYLIST_RULE
10137
137
SmartPlaylistRule.xml
busydialog
WINDOW_DIALOG_BUSY
10138
138
DialogBusy.xml
pictureinfo
WINDOW_DIALOG_PICTURE_INFO
10139
139
DialogPictureInfo.xml
pluginsettings
WINDOW_DIALOG_PLUGIN_SETTINGS
10140
140
DialogPluginSettings.xml
10141
141
DialogAccessPoints.xml
fullscreeninfo
WINDOW_DIALOG_FULLSCREEN_INFO
10142
142
DialogFullScreenInfo.xml
karaokeselector
WINDOW_DIALOG_KARAOKE_SONGSELECT
10143
143
DialogKaraokeSongSelector.xml
karaokelargeselector
WINDOW_DIALOG_KARAOKE_SELECTOR
10144
144
DialogKaraokeSongSelectorLarge.xml
sliderdialog
WINDOW_DIALOG_SLIDER
10145
145
DialogSlider.xml
musicplaylist
WINDOW_MUSIC_PLAYLIST
10500
500
MyMusicPlaylist.xml
musicfiles
WINDOW_MUSIC_FILES
10501
501
MyMusicSongs.xml
musiclibrary
WINDOW_MUSIC_NAV
10502
502
MyMusicNav.xml
musicplaylisteditor
WINDOW_MUSIC_PLAYLIST_EDITOR
10503
503
MyMusicPlaylistEditor.xml
virtualkeyboard
WINDOW_VIRTUAL_KEYBOARD
11000
1000
.
selectdialog
WINDOW_DIALOG_SELECT
12000
2000
DialogSelect.xml
musicinformation
WINDOW_MUSIC_INFO
12001
2001
DialogAlbumInfo.xml
okdialog
WINDOW_DIALOG_OK
12002
2002
DialogOK.xml
movieinformation
WINDOW_VIDEO_INFO
12003
2003
DialogVideoInfo.xml
scriptsdebuginfo
WINDOW_SCRIPTS_INFO
12004
2004
DialogScriptInfo.xml
fullscreenvideo
WINDOW_FULLSCREEN_VIDEO
12005
2005
VideoFullScreen.xml
visualisation
WINDOW_VISUALISATION
12006
2006
MusicVisualisation.xml
slideshow
WINDOW_SLIDESHOW
12007
2007
SlideShow.xml
filestackingdialog
WINDOW_DIALOG_FILESTACKING
12008
2008
DialogFileStacking.xml
weather
WINDOW_WEATHER
12600
2600
MyWeather.xml
xlinkkai
WINDOW_BUDDIES
12700
2700
MyBuddies.xml
screensaver
WINDOW_SCREENSAVER
12900
2900
none
videoosd
WINDOW_OSD
12901
2901
VideoOSD.xml
videomenu
WINDOW_MEDIA_MENU
12902
2902
none
startup
WINDOW_STARTUP
12999
2999
startup.xml
startwindow
-
-
-
shortcut to the current startwindow

In addition, there are the following “special” windows whose id is not really a concern (and you'll notice isn't unique)

Pointer - - 105 Pointer.xml
musicoverlay
WINDOW_MUSIC_OVERLAY
12903
2903
MusicOverlay.xml
videooverlay
WINDOW_VIDEO_OVERLAY
12904
2904
VideoOverlay.xml
Python Windows - - 3000–3099 none

Apendix II: List of Boolean Conditions

Player.HasMedia Returns true if the player has an audio or video file.
Player.HasAudio Returns true if the player has an audio file.
Player.HasDuration Returns true if Media isn't a true stream
Player.HasVideo Returns true if the player has a video file.
Player.Playing Returns true if the player is currently playing (ie not ffwding, rewinding or paused.)
Player.Paused Returns true if the player is paused.
Player.Forwarding Returns true if the player is fast forwarding.
Player.Forwarding2x Returns true if the player is fast forwarding at 2x.
Player.Forwarding4x Returns true if the player is fast forwarding at 4x.
Player.Forwarding8x Returns true if the player is fast forwarding at 8x.
Player.Forwarding16x Returns true if the player is fast forwarding at 16x.
Player.Forwarding32x Returns true if the player is fast forwarding at 32x.
Player.Rewinding Returns true if the player is rewinding.
Player.Rewinding2x Returns true if the player is rewinding at 2x.
Player.Rewinding4x Returns true if the player is rewinding at 4x.
Player.Rewinding8x Returns true if the player is rewinding at 8x.
Player.Rewinding16x Returns true if the player is rewinding at 16x.
Player.Rewinding32x Returns true if the player is rewinding at 32x.
Player.CanRecord Returns true if the player can record the current internet stream.
Player.Recording Returns true if the player is recording the current internet stream.
Player.Caching Returns true if the player is current re-caching data (internet based video playback).
Player.SeekBar Returns true for the first 2.5 seconds after a video seek.
Player.DisplayAfterSeek Returns true after any seek.
Player.Seeking Returns true if a seek is in progress
Player.ShowTime Returns true if the user has requested the time to show (occurs in video fullscreen)
Player.ShowInfo Returns true if the user has requested the song info to show (occurs in visualisation fullscreen and slideshow)
Player.ShowCodec Returns true if the user has requested the time to show (occurs in visualisation fullscreen)
Player.Muted Returns true if the volume is muted.
Playlist.IsRandom Returns true if the player is in random mode.
Playlist.IsRepeat Returns true if the player is in repeat all mode.
Playlist.IsRepeatOne Returns true if the player is in repeat one mode.
AudioScrobbler.Enabled Returns true if songs played are submitted to audioscrobbler.
MusicPlayer.HasNext Returns true if the music player has a next song queued inthe Playlist.
MusicPlayer.HasPrevious Returns true if the music player has a a Previous Song in the Playlist .
MusicPlayer.Offset(number).Exists Returns true if the music players playlist has a song queued in position (number).
VideoPlayer.UsingOverlays Returns true if the video player is using the hardware overlays render method. Useful, as with hardware overlays you have no alpha blending to the video image, so shadows etc. need redoing, or disabling.
VideoPlayer.IsFullscreen Returns true if the video player is in fullscreen mode.
VideoPlayer.HasMenu Returns true if the video player has a menu (ie is playing a DVD)
VideoPlayer.HasInfo Returns true if the current playing video has information from the library or from a plugin (eg director/plot etc.)
VideoPlayer.Content(parameter) Returns true if the current Video you are playing is contained in corresponding Video Library sections. The following values are accepted : files, movies, episodes, musicvideos
MusicPartyMode.Enabled Returns true if Party Mode is enabled
Visualisation.Enabled Returns true if any visualisation has been set in settings (so not None).
Visualisation.Locked Returns true if the current visualisation preset is locked (eg in Milkdrop.)
Weather.IsFetched Returns true if the weather data has been downloaded.
Window.IsVisible(window) Returns true if the window is visible (includes fade out time on dialogs)
Window.IsActive(window) Returns true if the window with id or title ?window? is active (excludes fade out time on dialogs) See here for a list of windows
Window.IsMedia Returns true if this window is a media window (programs, music, video, scripts, pictures)
Window.Next(window) Returns true if the window with id or title ?window? is being moved to. See here for a list of windows. Only valid while windows are changing.
Window.Previous(window) Returns true if the window with id or title ?window? is being moved from. See here for a list of windows. Only valid while windows are changing.
System.HasAlarm(alarm) Returns true if the system has the ?alarm? alarm set.
System.AlarmLessOrEqual(alarmname,seconds) Returns true if the alarm with ?alarmname? has less or equal to ?seconds? left. Standard use would be system.alarmlessorequal(shutdowntimer,119), which would return true when the shutdowntimer has less then 2 minutes left.
System.HasNetwork Returns true if the ethernet cable is plugged in.
System.HasMediadvd Returns true if there is a CD or DVD in the DVD-ROM drive.
System.IdleTime(time) Returns true if XBMC has had no input for ?time? amount of seconds.
System.IdleTime(time) Returns true if XBMC has had no input for ?time? amount of seconds.
System.HasAddon(id) Returns true if the specified addon is installed on the system.
System.AutoDetection Returns true if another Xbox is detected on network.
system.isloggedon Returns true if a user is currently logged on under a profile
system.hasloginscreen Returns true if the profile login screen is enabled
system.time(startTime,endTime) Returns true if the current system time is >= startTime and < endTime. endTime is optional. Time must be specified in the format HH:mm, using a 24 hour clock.
system.date(startDate,endDate) Returns true if the current system date is >= startDate and < endDate. endDate is optional. Date must be specified in the format MM-DD.
system.platform.xbox Returns true if XBMC is running on a xbox.
system.platform.linux Returns true if XBMC is running on a linux/unix/osx based computer.
system.platform.windows Returns true if XBMC is running on a windows based computer.
system.canpowerdown Returns true if XBMC can powerdown the system.
system.cansuspend Returns true if XBMC can suspend the system.
system.canhibernate Returns true if XBMC can hibernate the system.
system.canreboot Returns true if XBMC can reboot the system.
Control.IsVisible(id) Returns true if the control with id ?id? is visible.
Control.HasFocus(id) Returns true if the currently focused control has id ?id?.
ControlGroup(group).HasFocus(id) Returns true if the control group with id “group” has control id “id” as it's focused item. If “id” is not present, or is 0, then it will return true if the currently focused control is in the control group with id “group”. Note that if the control group with id “group” does not have focus, then this will still return true if the last focused item in the group had control id “id”.
ButtonScroller.HasFocus(id) Returns true if the buttonscroller is focused, and the current button has id ?id?.
Skin.HasTheme(theme) Returns true if the user has selected the theme with name ?theme?.
Skin.HasSetting(setting) Returns the state of the skin-specified setting ?setting?. You can toggle a setting from a button by using <onclick>Skin.ToggleSetting(setting)</onclick>.
Skin.String(string) Returns whether the skin string (set via Skin.SetString, Skin.SetPath, or Skin.SetImage) is non-empty.
ListItem.IsFolder Returns whether the current ListItem is a folder
ListItem.IsPlaying Returns whether the current ListItem.* info labels and images are currently Playing media
Container.HasThumb Returns true if the current container you are in has a thumb assigned to it
Container.Content(parameter) Returns true if the current container you are in contains the following: files, songs, artists, albums, movies, tvshows, seasons, episodes, musicvideos, genres, years, actors, playlists, plugins, studios, directors (Note: these currently only work in the Video and Music Library or unless a Plugin has set the value)
Container(id).OnNext Returns true if the container with id (or current container if id is omitted) is moving to the next item. Allows views to be custom-designed (such as 3D coverviews etc.)
Container(id).OnScrollNext Returns true if the container with id (or current container if id is omitted) is scrolling to the next item. Differs from OnNext in that OnNext triggers on movement even if there is no scroll involved.
Container(id).OnPrevious Returns true if the container with id (or current container if id is omitted) is moving to the previous item. Allows views to be custom-designed (such as 3D coverviews etc.)
Container(id).OnScrollPrevious Returns true if the container with id (or current container if id is omitted) is scrolling to the previous item. Differs from OnPrevious in that OnPrevious triggers on movement even if there is no scroll involved.
Container(id).HasFocus(item_number) Returns true if the container with id (or current container if id is omitted) has static content and is focused on the item with id item_number.
Container(id).HasFiles Returns true if the container contains files (or current container if id is omitted).
Container(id).HasFolders Returns true if the container contains folders (or current container if id is omitted).
Container(id).HasNext Returns true if the container (id) has a next page.
Container(id).HasPrevious Returns true if the container (id) has a previous page.
Container(id).IsStacked Returns true if the container is currently in stacked mode (or current container if id is omitted).
Container(id).Row(row) Returns true if the container with id (or current container if id is omitted) is focused on the row given.
Container(id).Column(col) Returns true if the container with id (or current container if id is omitted) is focused on the column given.
Container(id).Position(pos) Returns true if the container with id (or current container if id is omitted) is focused on the position given.
Container(id).Scrolling Returns true if the user is currently scrolling through the container with id (or current container if id is omitted). Note that this is slightly delayed from the actual scroll start. Use Container(id).OnScrollNext/OnScrollPrevious to trigger animations immediately on scroll.
LastFM.RadioPlaying Returns true if Last.fm radio is playing.
LastFM.CanLove Returns true if the current song can be added to the users Last.fm loved songs.
LastFM.CanBan Returns true if the current song can be banned from the users Last.fm radio.
stringcompare(info,string) Returns true if the info equals the string. example of info: ListItem.Title, ListItem.Genre. Please note that string can also be a $LOCALIZE[] or info label. Also note that in a panelview or similar this only works on the focused item.
substring(info,string) Returns true if the string is found anywhere in the info
substring(info,string,[Left or Right]) Returns true if the string is found from the start or the end.
Example:

(foobars,foob,Left) -> true
(foobars,foob,Right) -> False
(foobars,bars,Right) -> true

IntegerGreaterThan(info,number) Returns true if the value of the infolabel is greater than the supplied number.
Example:

IntegerGreaterThan(ListItem.Year,2000)

Library.HasContent(string) Returns true if the XBMC libraries have the content from string. Valid Strings are (Video, Music, Movies, TVShows, MusicVideos)

Apendix III: List of Info Labels

Labels Available In XBMC

AudioScrobbler.ConnectState Connected to the audioscrobbler
AudioScrobbler.SubmitInterval Shows next reconnect when submission failed
AudioScrobbler.FilesCached Number of cached songs
AudioScrobbler.SubmitState Shows time left until the current song is submitted
Container.FolderPath Shows complete path of currently displayed folder
Container.FolderName Shows top most folder in currently displayed folder
Container.Viewmode Returns the current viewmode (list, icons etc.)
Container.SortMethod Returns the current sort method (name, year, rating, etc.)
Container.PluginName Returns the current plugins base folder name
Container.PluginCategory Returns the current plugins category (set by the scripter)
Container.ShowPlot Returns the TV Show Plot of the current container and can be used at season and episode level
Container(id).NumPages Number of pages in the container with given id. If no id is specified it grabs the current container.
Container(id).NumItems Number of items in the container with given id. If no id is specified it grabs the current container.
Container(id).CurrentPage Current page in the container with given id. If no id is specified it grabs the current container.
Container(id).Position Returns the current focused position of Container (id) as a numeric label.
Container(id).ListItem(offset).Label Shows ListItem.Label for a specific List or Panel Container with a offset ( eg: Container(50).Listitem(2).Label )
Container(id).ListItem(offset).Label2 Shows ListItem.Label2 for a specific List or Panel Container with a offset ( eg: Container(50).Listitem(-2).Label2 )
Container(id).ListItem(offset).Icon Shows ListItem.Icon for a specific List or Panel Container with a offset ( eg: Container(52).Listitem(1).Icon)
Container(id).ListItem(offset).ActualIcon Shows ListItem.ActualIcon for a specific List or Panel Container with a offset ( eg: Container(50).Listitem(0).ActualIcon )
Container(id).ListItem(offset).Thumb Shows ListItem.Thumb for a specific List or Panel Container with a offset ( eg: Container(50).Listitem(0).Thumb )
Control.GetLabel(id) Returns the label value or texture name of the control with the given id.
listitem.label Shows the left label of the currently selected item in a list or thumb control
listitem.label2 Shows the right label of the currently selected item in a list or thumb control
listitem.title Shows the title of the currently selected song or movie in a list or thumb control
listitem.originaltitle Shows the original title of the currently selected movie in a list or thumb control
ListItem.SortLetter Shows the first letter of the current file in a list or thumb control
listitem.tracknumber Shows the track number of the currently selected song in a list or thumb control
listitem.artist Shows the artist of the currently selected song in a list or thumb control
ListItem.Property(Artist_Born) Date of Birth of the currently selected Artist
ListItem.Property(Artist_Died) Date of Death of the currently selected Artist
ListItem.Property(Artist_Formed) Formation date of the currently selected Band
ListItem.Property(Artist_Disbanded) Disbanding date of the currently selected Band
ListItem.Property(Artist_YearsActive) Years the currently selected artist has been active
ListItem.Property(Artist_Instrument) Instruments played by the currently selected artist
ListItem.Property(Artist_Description) Shows a biography of the currently selected artist
ListItem.Property(Artist_Mood) Shows the moods of the currently selected artist
ListItem.Property(Artist_Style) Shows the styles of the currently selected artist
ListItem.Property(Artist_Genre) Shows the genre of the currently selected artist
listitem.album Shows the album of the currently selected song in a list or thumb control
ListItem.Property(Album_Mood) Shows the moods of the currently selected Album
ListItem.Property(Album_Style) Shows the styles of the currently selected Album
ListItem.Property(Album_Theme) Shows the themes of the currently selected Album
ListItem.Property(Album_Type) Shows the Album Type (e.g. compilation, enhanced, explicit lyrics) of the currently selected Album
ListItem.Property(Album_Label) Shows the record label of the currently selected Album
ListItem.Property(Album_Description) Shows a review of the currently selected Album
listitem.year Shows the year of the currently selected song, album or movie in a list or thumb control
listitem.genre Shows the genre of the currently selected song, album or movie in a list or thumb control
listitem.director Shows the director of the currently selected movie in a list or thumb control
ListItem.Episode Shows the number of episodes for the currently selected tvshow or season
ListItem.Season Shows the season value for the currently selected tvshow
ListItem.TVShowTitle Shows the name value for the currently selected tvshow in the season and episode depth of the video library
ListItem.Property(WatchedEpisodes) Shows the number of watched episodes for the currently selected tvshow
ListItem.Property(UnWatchedEpisodes) Shows the number of unwatched episodes for the currently selected tvshow
ListItem.PictureResolution Shows the dimensions of the selected picture
ListItem.PictureDateTime Shows the date/timestamp of the selected picture
listitem.filename Shows the filename of the currently selected song or movie in a list or thumb control
listitem.path Shows the complete path of the currently selected song or movie in a list or thumb control
ListItem.FolderName Shows top most folder of the path of the currently selected song or movie in a list or thumb control
listitem.filenameandpath Shows the full path with filename of the currently selected song or movie in a list or thumb control
listitem.date Shows the file date of the currently selected song or movie in a list or thumb control
listitem.size Shows the file size of the currently selected song or movie in a list or thumb control
listitem.rating Shows the IMDB rating of the currently selected movie in a list or thumb control
listitem.ratingandvotes Shows the IMDB rating and votes of the currently selected movie in a list or thumb control
listitem.mpaa Show the MPAA rating of the currently selected movie in a list or thumb control
listitem.programcount Shows the number of times an xbe has been run from "my programs"
listitem.duration Shows the song or movie duration of the currently selected movie in a list or thumb control
listitem.cast Shows a concatenated string of cast members of the currently selected movie in a list or thumb control
listitem.castandrole Shows a concatenated string of cast members and roles of the currently selected movie in a list or controlpanel
listitem.Studio Studio of current selected Music Video in a list or thumb control
listitem.Trailer Shows the full trailer path with filename of the currently selected movie in a list or thumb control
listitem.Writer Name of Writer of current Video in a list or thumb control
listitem.Tagline Small Summary of current Video in a list or thumb control
listitem.PlotOutline Small Summary of current Video in a list or thumb control
listitem.Plot Complete Text Summary of Video in a list or thumb control
ListItem.VideoCodec Shows the video codec of the currently selected video (common values: 3iv2, avc1, div2, div3, divx, divx 4, dx50, flv, h264, microsoft, mp42, mp43, mp4v, mpeg1video, mpeg2video, mpg4, svq1, svq3, theora, vp6f, wmv2, wmv3, wvc1, xvid)
ListItem.VideoResolution Shows the resolution of the currently selected video (possible values: 480, 540, 720, 1080)
ListItem.VideoAspect Shows the aspect ratio of the currently selected video (possible values: 1.33, 1.66, 1.78, 1.85, 2.20, 2.35)
ListItem.AudioCodec Shows the audio codec of the currently selected video (common values: aac, ac3, dca, mp1, mp2, mp3, pcm_s16be, pcm_s16le, pcm_u8, vorbis, wmapro, wmav2)
ListItem.AudioChannels Shows the number of audio channels of the currently selected video (possible values: 0, 1, 2, 4, 5, 6, 8)
ListItem.AudioLanguage Shows the audio language of the currently selected video (returns an ISO 639-2 three character code, e.g. eng, epo, deu)
ListItem.SubtitleLanguage Shows the subtitle language of the currently selected video (returns an ISO 639-2 three character code, e.g. eng, epo, deu)
MusicPlayer.Title Title of the currently playing song, also available are "MusicPlayer.offset(number).Title" offset is relative to the current playing item and "MusicPlayer.Position(number).Title" position is relative to the start of the playlist
MusicPlayer.Album Album from which the current song is from, also available are "MusicPlayer.offset(number).Album" offset is relative to the current playing item and "MusicPlayer.Position(number).Album" position is relative to the start of the playlist
MusicPlayer.Property(Album_Mood) Shows the moods of the currently playing Album
MusicPlayer.Property(Album_Style) Shows the styles of the currently playing Album
MusicPlayer.Property(Album_Theme) Shows the themes of the currently playing Album
MusicPlayer.Property(Album_Type) Shows the Album Type (e.g. compilation, enhanced, explicit lyrics) of the currently playing Album
MusicPlayer.Property(Album_Label) Shows the record label of the currently playing Album
MusicPlayer.Property(Album_Description) Shows a review of the currently playing Album
MusicPlayer.Artist Artist(s) of current song, also available are "MusicPlayer.offset(number).Artist" offset is relative to the current playing item and "MusicPlayer.Position(number).Artist" position is relative to the start of the playlist
MusicPlayer.Property(Artist_Born) Date of Birth of the currently playing Artist
MusicPlayer.Property(Artist_Died) Date of Death of the currently playing Artist
MusicPlayer.Property(Artist_Formed) Formation date of the currently playing Artist/Band
MusicPlayer.Property(Artist_Disbanded) Disbanding date of the currently playing Artist/Band
MusicPlayer.Property(Artist_YearsActive) Years the currently Playing artist has been active
MusicPlayer.Property(Artist_Instrument) Instruments played by the currently playing artist
MusicPlayer.Property(Artist_Description) Shows a biography of the currently playing artist
MusicPlayer.Property(Artist_Mood) Shows the moods of the currently playing artist
MusicPlayer.Property(Artist_Style) Shows the styles of the currently playing artist
MusicPlayer.Property(Artist_Genre) Shows the genre of the currently playing artist
MusicPlayer.Genre Genre(s) of current song, also available are "MusicPlayer.offset(number).Genre" offset is relative to the current playing item and "MusicPlayer.Position(number).Genre" position is relative to the start of the playlist
MusicPlayer.Year Year of release of current song, also available are "MusicPlayer.offset(number).Year" offset is relative to the current playing item and "MusicPlayer.Position(number).Year" position is relative to the start of the playlist
MusicPlayer.Rating Numeric Rating of current song, also available are "MusicPlayer.offset(number).Rating" offset is relative to the current playing item and "MusicPlayer.Position(number).Rating" position is relative to the start of the playlist
MusicPlayer.DiscNumber Disc Number of current song stored in ID tag info, also available are "MusicPlayer.offset(number).DiscNumber" offset is relative to the current playing item and "MusicPlayer.Position(number).DiscNumber" position is relative to the start of the playlist
MusicPlayer.Comment Comment of current song stored in ID tag info, also available are "MusicPlayer.offset(number).Comment" offset is relative to the current playing item and "MusicPlayer.Position(number).Comment" position is relative to the start of the playlist
MusicPlayer.Time Current time in song
MusicPlayer.TimeRemaining Current remaining time in song
MusicPlayer.TimeSpeed Both the time and the playspeed formatted up. eg 1:23 (2x)
MusicPlayer.TrackNumber Track number of current song, also available are "MusicPlayer.offset(number).TrackNumber" offset is relative to the current playing item and "MusicPlayer.Position(number).TrackNumber" position is relative to the start of the playlist
MusicPlayer.Duration Duration of current song, also available are "MusicPlayer.offset(number).Duration" offset is relative to the current playing item and "MusicPlayer.Position(number).Duration" position is relative to the start of the playlist
MusicPlayer.BitRate Bitrate of current song
MusicPlayer.Channels Number of channels of current song
MusicPlayer.BitsPerSample Number of bits per sample of current song
MusicPlayer.SampleRate Samplerate of current song
MusicPlayer.Codec Codec of current song
MusicPlayer.PlaylistPosition Position of the current song in the current music playlist
MusicPlayer.PlaylistLength Total size of the current music playlist
MusicPartyMode.SongsPlayed Number of songs played during Party Mode
MusicPartyMode.MatchingSongs Number of songs available to Party Mode
MusicPartyMode.MatchingSongsPicked Number of songs picked already for Party Mode
MusicPartyMode.MatchingSongsLeft Number of songs left to be picked from for Party Mode
MusicPartyMode.RelaxedSongsPicked Not currently used
MusicPartyMode.RandomSongsPicked Number of unique random songs picked during Party Mode
Network.IPAddress The Xbox's IP Address (formatted as IP: <ipaddress>)
Network.MacAddress xbox mac address
Network.IsDHCP network type is DHCP or FIXED
Network.LinkState network linkstate e.g. 10mbit/100mbit etc.
Network.SubnetAddress network subnet address
Network.GatewayAddress network gateway address
Network.DHCPAddress DHCP ip address
Network.DNS1Address network dns 1 address
Network.DNS2Address network dns 2 address
Player.FinishTime Time playing media will end
Player.Time Elapsed time of current playing media
Player.TimeRemaining Remaining time of current playing media
Player.Duration Total duration of the current playing media
Player.SeekTime Time to which the user is seeking
Player.Volume Current volume (between -60 and 0dB)
Player.CacheLevel Players current cache fill percentage (if supported by the player)
Player.Folderpath Shows the full path of the currently playing song or movie
Player.Filenameandpath Shows the full path with filename of the currently playing song or movie
Playlist.Position Position of the current item in the current playlist (video or music)
Playlist.Length Total size of the current playlist (video or music)
Playlist.Random Returns string ID's 590 (Randomize Play Enabled) or 591 (Disabled)
Playlist.Repeat Returns string ID's 592 (Repeat One), 593 (Repeat All), or 594 (Repeat Off)
Skin.CurrentTheme Returns the current selected skin theme.
Skin.String(name)

Returns the user-set skin string, set via the Skin.SetString(name) built in function. Allows skinners to have user-customisable labels.

System.Time Current time
System.Date Current date
System.Alarmpos Shutdown Timer position
System.Freespace Total Freespace on the drive
System.Usedspace Total Usedspace on the drive
System.Totalspace Totalspace on the drive
System.UsedspacePercent Total Usedspace Percent on the drive
System.FreespacePercent Total Freespace Percent on the drive
System.Freespace(DRIVE) Freespace on drive DRIVE. DRIVE can be C, E, F, G, X, Y or Z
system.usedspace(DRIVE) Usedspace on drive DRIVE. DRIVE can be C, E, F, G, X, Y or Z
system.totalspace(DRIVE) Totalspace on drive DRIVE. DRIVE can be C, E, F, or G
System.UsedspacePercent(DRIVE) Usedspace Percent on drive DRIVE. DRIVE can be C, E, F, or G
System.FreespacePercent(DRIVE) Freespace Percent on drive DRIVE. DRIVE can be C, E, F, or G
System.CPUTemperature Current CPU temperature
System.GPUTemperature Current GPU temperature
System.FanSpeed Current fan speed
System.BuildVersion Version of build
System.BuildDate Date of build
System.FPS Current rendering speed (frames per second)
System.FreeMemory Amount of free memory in Mb
System.ScreenMode Screenmode (eg PAL)
System.ScreenWidth Width of screen in pixels
System.ScreenHeight Height of screen in pixels
System.CurrentWindow Current Window we are in
System.CurrentControl Current focused control
System.XboxNickName Nickname of the xbox
System.DVDLabel Label of the disk in the DVD-ROM drive
System.LaunchXBE Label of the currently launched Game or Application
system.hddtemperature hdd temperature
system.hddinfomodel hdd model info
system.hddinfofirmware hdd firmware version
system.hddinfoserial hdd serial number
system.hddinfopw hdd password
system.hddinfolockstate hdd lockstate info
system.hddlockkey hdd lock key
system.hddbootdate hdd first boot date
system.hddcyclecount hdd switch on counter
system.dvdinfomodel dvd model info
system.dvdinfofirmware dvd firmware version
system.hddcyclecount hdd switch on counter
system.mplayerversion mplayer.dll version
system.kernelversion xbox kernel version
system.uptime system current uptime
system.totaluptime system total uptime
system.cpufrequency xbox cpu frequency
system.xboxversion detected xbox version
system.avcablepackinfo av cablepack info
system.screenresolution screen resolution
system.videoencoderinfo video encoder info
system.xboxserial xbox serial number
system.videoxberegion xbox video xbe region
system.bios xbox detected bios, id's -> \system\systeminfo\biosIds.ini
system.modchip detected modchip
system.internetstate will return the internet state, connected or not connected

and for Conditional use: Connected->TRUE, not Connected->FALSE, do not use to check status in a pythonscript since it is threaded.

system.controllerport(x) for x=1,2,3,4 will in time return connected devices on the controller port e.g. system.controllerport(1)
System.Language Shows the current language
System.GetBool(boolean) Returns the value of any standard system boolean setting. Will not work with settings in advancedsettings.xml
System.ProfileName Shows the User name of the currently logged in XBMC user
Visualisation.Preset Shows the current preset of the visualisation
Visualisation.Name Shows the name of the visualisation
VideoPlayer.Time Current time in movie
VideoPlayer.TimeRemaining Current remaining time in movie
VideoPlayer.TimeSpeed Current time + playspeed. eg 1:23:14 (-4x)
VideoPlayer.Duration Length of current movie
VideoPlayer.Title Title of currently playing video. If it's in the database it will return the database title, else the filename
VideoPlayer.TVShowTitle Title of currently playing episode's tvshow name
VideoPlayer.Genre Genre(s) of current movie, if it's in the database
VideoPlayer.Director Director of current movie, if it's in the database
VideoPlayer.Year Year of release of current movie, if it's in the database
VideoPlayer.Rating IMDb user rating of current movie, if it's in the database
VideoPlayer.RatingAndVotes IMDb user rating and votes of current movie, if it's in the database
VideoPlayer.mpaa MPAA rating of current movie, if it's in the database
VideoPlayer.PlaylistPosition Position of the current song in the current video playlist
VideoPlayer.PlaylistLength Total size of the current video playlist
VideoPlayer.Cast A concatenated string of cast members of the current movie, if it's in the database
VideoPlayer.CastAndRole A concatenated string of cast members and roles of the current movie, if it's in the database
VideoPlayer.Album Album from which the current Music Video is from, if it's in the database
VideoPlayer.Artist Artist(s) of current Music Video, if it's in the database
VideoPlayer.Studio Studio of current Music Video, if it's in the database
VideoPlayer.Writer Name of Writer of current playing Video, if it's in the database
VideoPlayer.Tagline Small Summary of current playing Video, if it's in the database
VideoPlayer.PlotOutline Small Summary of current playing Video, if it's in the database
VideoPlayer.Plot Complete Text Summary of current playing Video, if it's in the database
VideoPlayer.VideoCodec Shows the video codec of the currently playing video (common values: see ListItem.VideoCodec)
VideoPlayer.VideoResolution Shows the video resolution of the currently playing video (possible values: see ListItem.VideoResolution)
VideoPlayer.VideoAspect Shows the aspect ratio of the currently playing video (possible values: see ListItem.VideoAspect)
VideoPlayer.AudioCodec Shows the audio codec of the currently playing video (common values: see ListItem.AudioCodec)
VideoPlayer.AudioChannels Shows the number of audio channels of the currently playing video (possible values: see ListItem.AudioChannels)
Weather.Conditions Current weather conditions – this is looked up in a background process.
Weather.Temperature Current weather temperature
Weather.Location City/town which the above two items are for
Fanart.Color1 Returns the first of three colors included in the currently selected Fanart theme for the parent TV Show. Colors are arranged Lightest to Darkest.
Fanart.Color2 Returns the second of three colors included in the currently selected Fanart theme for the parent TV Show. Colors are arranged Lightest to Darkest.
Fanart.Color3 Returns the third of three colors included in the currently selected Fanart theme for the parent TV Show. Colors are arranged Lightest to Darkest.
Window([window]).Property(key) Window property. (key can be any value, optional window can be id or name)
Window.Property(xmlfile) Displays the name of the xml file currently shown
Window(Weather).Property(key) The weather window has the following info labels.

Location, Updated, Current.Condition, Current.Temperature, Current.FeelsLike, Current.UVIndex, Current.Wind, Current.DewPoint, Current.Humidity, Day0.Title, Day0.HighTemp, Day0.LowTemp, Day0.Outlook, Day1.Title, Day1.HighTemp, Day1.LowTemp, Day1.Outlook, Day2.Title, Day2.HighTemp, Day2.LowTemp, Day2.Outlook, Day3.Title, Day3.HighTemp, Day3.LowTemp, Day3.Outlook

Images Available in XBMC

container.folderthumb Thumbnail Image of the current displayed folder of list and thumb panels
container.tvshowthumb Thumbnail Image of the parent TV show
Container.SeasonThumb Thumbnail Image of the parent TV show season
ListItem.Property(SeasonThumb) Thumbnail Image of the parent TV show season, for use in dialogvideoinfo.xml
Weather.Conditions Image of current weather conditions
Player.StarRating Returns a value of 0 to 5 as a graphical display from images named rating0.png to rating5.png of the skin
MusicPlayer.Cover Cover of currently playing album
MusicPlayer.Property(Fanart_Image) Fanart image of the currently playing artist
VideoPlayer.Cover Cover of currently playing movie
ListItem.Thumb Shows the thumbnail (if it exists) of the currently selected item in a list or thumb control
ListItem.Icon Shows the thumbnail (if it exists) of the currently selected item in a list or thumb control. If no thumbnail image exists, it will show the “Big” version of the icon.
ListItem.ActualIcon Shows the icon of the currently selected item in a list or thumb control.
ListItem.Overlay Shows the Overlay Icon status (compressed file, Trainer, watched, unwatched, locked) of the currently selected item in a list or thumb control.
Skin.String(name)

Returns the image or image folder set by the user via a Skin.SetPath(name) or Skin.SetImage(name) built in function. Allows skinners to have user-customisable images and multiimages.

System.ProfileThumb Shows the Thumbnail image of the currently logged in XBMC user
Fanart.Image Fanart image for the parent TV Show
Listitem.Property(Fanart_Image) Fanart image for the selected item
Window([window]).Property(key) Window property. (key can be any value, optional window can be id or name)
Window(Weather).Property(key) The weather window has the following info images.

Current.ConditionIcon, Day0.OutlookIcon, Day1.OutlookIcon, Day2.OutlookIcon, Day3.OutlookIcon, Current.FanartCode, Day0.FanartCode, Day1.FanartCode, Day2.FanartCode, Day3.FanartCode

Apendix IV: List of Built In Functions

The latest up-to-date list of built-in functions can be found in the function CBuiltins::Execute() in the source code file xbmc/interfaces/Builtins.cpp.

In addition to the following list, for most <onclick> and <onfocus> button actions in the skin you can also use the functions from Keymap.xml.

Example:
<onclick>VolumeUp</onclick>
<onclick>VolumeDown</onclick>

You can use parameters with all media windows, as can be seen here:

All Platforms

Reboot Cold reboots the system (power cycle)
ShutDown Trigger default Shutdown action defined in System Settings, Default Powerdown on Xbox and Quit on Linux / OSX / Windows
Powerdown Powerdown system
Quit Quits XBMC (same as Dashboard on Xbox)
Hibernate Hibernate (S4) the System (not working on Xbox due to hardware limitations)
Suspend Suspends (S3 / S1 depending on bios setting) the System (not working on Xbox due to hardware limitations)
RestartApp Restarts XBMC
Minimize Minimizes XBMC
Credits Runs the Credits
Mastermode Runs XBMC in master mode
ActivateWindow(window[,dir,return]) Opens the given window. The parameter window can either be the window's id, or in the case of a standard window, the window's name. See here for a list of window names, and their respective ids. If, furthermore, the window is Music, Video, Pictures, or Program files, then the optional dir parameter specifies which folder XBMC should default to once the window is opened. This must be a source as specified in Sources.xml, or a subfolder of a valid source. For some windows (MusicLibrary and VideoLibrary), the return parameter may be specified, which indicates that XBMC should use this folder as the "root" of the level, and thus the "parent directory" action from within this folder will return the user to where they were prior to the window activating. On Xbox, the special command ActivateWindow(MyFiles,autodetection) opens the filemanager with the autodetected Xbox in the left hand pane.
ReplaceWindow(window,dir) Replaces the current window with the given window. This is the same as ActivateWindow() but it doesn't update the window history list, so when you go back from the new window it will not return to the previous window, rather will return to the previous window's previous window.
TakeScreenshot Takes a Screenshot
RunScript(script[,args]*) Runs the python script. You must specify the full path to the script, (or use Q:\Scripts\Scriptname.py on Xbox). As of 2007/02/24, all extra parameters are passed to the script as arguments and can be accessed by python using sys.argv
RunAppleScript(script[,args]*) RRun the specified AppleScript command
RunPlugin(plugin) Runs the plugin. Full path must be specified. Does not work for folder plugins
Extract Extracts a specified archive to an optionally specified path. ! REQUIRES ABSOLUTE PATHS !
PlayMedia(media[,1]) Plays the media. This can be a playlist, music, or video file or an Url. The optional parameter ",1" will start a video in a preview window, instead of fullscreen.
SlideShow(dir [,recursive, [not]random]) Starts a slideshow of pictures in the folder dir. Optional parameters are "recursive", and "random" or "notrandom" parameters. The "recursive" parameter starts a recursive slideshow, adding images from sub-folders. The "random" and "notrandom" parameters override the Randomize setting found in the pictures media window.
RecursiveSlideShow(dir) Run a slideshow from the specified directory, including all subdirs
ReloadSkin() Reloads the current skin – useful for skinners to use after they upload modified skin files (saves power cycling)
RefreshRSS Reload RSS feeds from RSSFeeds.xml
PlayerControl(command) Allows control of music and videos. The command may be one of Play, Stop, Forward, Rewind, Next, Previous, BigSkipForward, BigSkipBackward, SmallSkipForward, SmallSkipBackward, Random, RandomOn, RandomOff, Repeat, RepeatOne, RepeatAll, RepeatOff, Partymode(music) or Partymode(video) or Partymode(path to .xsp file), and Record. Play will either pause, resume, or stop ffwding or rewinding. Random toggles random playback, Repeat cycles through the repeat modes, Partymode(music/video) toggles the appropriate partymode, defaults to music if no parameter is given, besides the default music or video partymode you can also pass a path to a custom smartplaylist (.xsp) as parameter. Record will work to record shoutcast streams (only?).
Playlist.PlayOffset Start playing from a particular offset in the playlist
Playlist.Clear Clear the current playlist
EjectTray() Either opens or closes the DVD tray, depending on its current state
AlarmClock(name,command,time[,silent]) Pops up a dialog asking for the length of time for the alarm (unless the parameter time is specified), and starts a timer. When the timer runs out, it'll execute the built-in command (the parameter command) if it is specified, otherwise it'll pop up an alarm notice. Set silent to true to hide the alarm notification.
CancelAlarm(name) Cancel a running alarm
Action Executes an action for the active window (same as in keymap)
Notification(header,message[,time,image]) Will display a notification dialog with the specified header and message, in addition you can set the length of time it displays in milliseconds and a icon image.
PlayDVD Will play the inserted CD or DVD media from the DVD-ROM drive.
RipCD Will rip the inserted CD from the DVD-ROM drive.
Skin.ToggleSetting(setting) Toggles the skin setting ?setting? for use with conditional visibility tags containing Skin.HasSetting(setting).
Skin.SetString(string[,value]) Pops up a keyboard dialog and allows the user to input a string which can be used in a label control elsewhere in the skin via the info tag Skin.String(string). If the value parameter is specified, then the keyboard dialog does not pop up, and the string is set directly.
Skin.SetNumeric(numeric[,value]) Pops up a keyboard dialog and allows the user to input a numerical.
Skin.SetPath(string[,value]) Pops up a folder browser and allows the user to select a folder of images to be used in a multi image control else where in the skin via the info tag Skin.String(string). If the value parameter is specified, then the file browser dialog does not pop up, and the path is set directly.
Skin.Theme Cycles the skin theme. Skin.theme(-1) will go backwards.
Skin.SetImage(string[,value]) Pops up a file browser and allows the user to select an image file to be used in an image control elsewhere in the skin via the info tag Skin.String(string). If the value parameter is specified, then the file browser dialog does not pop up, and the image path is set directly.
Skin.SetLargeImage(string[,value]) Pops up a file browser and allows the user to select an large image file to be used in an image control else where in the skin via the info tag Skin.String(string). If the value parameter is specified, then the file browser dialog does not pop up, and the image path is set directly.
Skin.SetFile(string,mask,folderpath) Pops up a folder browser and allows the user to select a file off the xbox harddisk to be used else where in the skin via the info tag Skin.String(string). If the mask parameter is specified, then the file browser will only search for the extension specified (.avi,.mp3,.m3u,.png,.bmp,etc.,etc.). If the folderpath parameter is set the file browser will start in that folder.
Skin.SetBool(setting) Sets the skin setting ?setting? to true, for use with the conditional visibility tags containing Skin.HasSetting(setting). The settings are saved per-skin in settings.xml just like all the other XBMC settings.
Skin.Reset(setting) Resets the skin setting ?setting?. If ?setting? is a bool setting (ie set via SetBool or ToggleSetting) then the setting is reset to false. If ?setting? is a string (Set via SetString, SetImage, or SetPath) then it is set to empty.
Skin.ResetSettings Resets all the above skin settings to their defaults (toggles all set to false, strings all set to empty.)
Mute Mutes (or unmutes) the volume.
SetVolume(percent) Sets the volume to the percentage specified.
Dialog.Close(dialog[,force]) Close a dialog. Set force to true to bypass animations.
System.LogOff Log off current user.
System.Exec Execute shell commands.
System.ExecWait Execute shell commands and freezes XBMC until shell is closed.
Resolution Change XBMC's Resolution.
UpdateLibrary(database,[path]) Takes either "video" or "music" as a parameter to begin updating the corresponding database. For "video" you can additionally specify a specific path to be scanned.
CleanLibrary(database) This funtion will perform a number of 'cleanup' tasks on your video database and can be run if you have moved, deleted or renamed files. Takes either "video" or "music" as a parameter to begin cleaning the corresponding database.
PageDown Send a page down event to the pagecontrol with given id.
PageUp Send a page up event to the pagecontrol with given id.
LastFM.Love All songs that can be submitted to Last.fm can be loved, optional parameter (false) = direct loving without confirmationdialog.
LastFM.Ban Only songs that are playing on last.fm radio can be banned, optional parameter (false) = direct banning without confirmationdialog.
Container.Refresh Refresh current listing.
Container.Update Update current listing. Send Container.Update(path,replace) to reset the path history.
Container.SetViewMode(id) Set the current view mode (list, icons etc.) to the given container id.
Container.NextViewMode Select the next view mode.
Container.PreviousViewMode Select the previous view mode.
Container.SetViewMode Move to the view with the given id.
Container.NextSortMethod Change to the next sort method.
Container.PreviousSortMethod Change to the previous sort method.
Container.SetSortMethod Change to the specified sort method.
Container.SortDirection Toggle the sort direction.
Control.Move(id,offset) Will make a Container with the "id" specified in the command move focus by "offset".
Control.SetFocus(id,position) Will make a list with the "id" specified in the command gain focus at "postion" number in its list. Alias SetFocus(id,position)
Control.Message(id,message,[windowid]) Sends a given message to a control in a given window (or active window if omitted). Messages can be movedown, moveup, pagedown, pageup, click.
SendClick(windowid,id) Sends a click to a control in a given window (or active window if omitted).
LoadProfile(profilename) Load the specified profile (note; if locks are active it won't work).
SetProperty(key,value) Sets a window property for the current window (key,value).
PlayWith() Play the selected item with the specified player core.
LIRC.Stop Removes XBMC as a LIRC client.
LIRC.Start Adds XBMC as a LIRC client.
LCD.Suspend Suspends LCDproc.
LCD.Resume Resumes LCDproc.
WakeOnLan(mac) Sends the wake-up packet to the broadcast address for the specified MAC address (Format: FF:FF:FF:FF:FF:FF or FF-FF-FF-FF-FF-FF).
ToggleDebug Enables/disables debug mode .

Xbox Only

Dashboard Runs the dashboard, as specified in the GUI Settings (Xbox specific)
RunXBE(xbe) Runs the xbe. Full path must be specified (Xbox specific)
BackupSystemInfo Creates bios, eeprom, systeminformation backup to /system/systeminfo/ (Xbox specific)
System.PWMControl() RGB PWM Control for SmartXX v3 and OPX (Xbox specific)

system.pwmcontrol(#ColorA,#ColorB,action,xTime)

  1. ColorA & ColorB: #rrggbb-> from #000000 up to #FFFFFF [e.g. #FF0000 is Red, ##FFC0CB is Pink..]
  2. xTime: in msec, 0=off min.=1 max.=no max limit
  3. action:
  1. "fade": will fade only once in xTime, from ColorA to ColorB! A->B
  2. "fadeloop": will fade in loop in xTime, from ColorA to ColorB! A->B, A->B, A->B
  3. "faderepeat": will repeat fade (ping-pong) in xTime steps, from ColorA to ColorB. A<->B
  4. "blink": will blink from ColorA to ColorB in xTime. A-B-A-B-A-B
  5. "switch": will switch only once from ColorA to ColorB in xTime
  6. "none" or EMPTY: Switch to a Color! Alternate use: system.pwmcontrol(#Color)