Default control tags: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>NedBot
m (Robot: Cosmetic changes)
No edit summary
Line 1: Line 1:
Here are the tags and attributes available for all controls. '''Note that they're all lowercase, as XML is case sensitive'''.
Here are the tags and attributes available for all controls. '''Note that they're all lowercase, as XML is case sensitive'''.


=== Tags available to all controls ===
=== Tags available to all controls ===!
{| class="dtable" border="0"
{| class="wikitable"
|- class="userrow"
! description
| class="usercell" | '''description'''
| Only used to make things clear for the skinner. Not read by XBMC at all.
| class="usercell" | Only used to make things clear for the skinner. Not read by XBMC at all.
|-
|- class="userrow"
! type
| class="usercell" | '''type'''
| The type of control.
| class="usercell" | The type of control.
|-
|- class="userrow"
! id
| class="usercell" | '''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. Any controls that the skinner specifies content needs not have an id unless it's needed for animation purposes.  For instance, most image and label controls don't need an id if the skinner specifies they're content.
| class="usercell" | 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. Any controls that the skinner specifies content needs not have an id unless it's needed for animation purposes.  For instance, most image and label controls don't need an id if the skinner specifies they're content.
|-
|- class="userrow"
! posx
| class="usercell" | '''posx'''
| Specifies where the left edge of the control should be drawn, relative to it's parent's left edge. If an "r" is included (eg 180r) then the measurement is taken from the parent's right edge (in the left direction).
| class="usercell" | Specifies where the left edge of the control should be drawn, relative to it's parent's left edge. If an "r" is included (eg 180r) then the measurement is taken from the parent's right edge (in the left direction).
|-
|- class="userrow"
! posy
| class="usercell" | '''posy'''
| Specifies where the top edge of the control should be drawn, relative to it's parent's top edge. If an "r" is included (eg 180r) then the measurement is taken from the parent's bottom edge (in the up direction).
| class="usercell" | Specifies where the top edge of the control should be drawn, relative to it's parent's top edge. If an "r" is included (eg 180r) then the measurement is taken from the parent's bottom edge (in the up direction).
|-
|- class="userrow"
! width
| class="usercell" | '''width'''
| Specifies the width that should be used to draw the control.
| class="usercell" | Specifies the width that should be used to draw the control.
|-
|- class="userrow"
! height
| class="usercell" | '''height'''
| Specifies the height that should be used to draw the control.
| class="usercell" | Specifies the height that should be used to draw the control.
|-
|- class="userrow"
! visible
| class="usercell" | '''visible'''
| Specifies a condition as to when this control will be visible. Can be true, false, or a condition. [[Conditional Visibility|See here for more information.]]  Defaults to true.
| class="usercell" | Specifies a condition as to when this control will be visible. Can be true, false, or a condition. [[Conditional Visibility|See here for more information.]]  Defaults to true.
|-
|- class="userrow"
! animation
| class="usercell" | '''animation'''
| Specifies the animation to be run when the control enters a particular state. [[Animating Your Skin|See here for more information]]
| class="usercell" | Specifies the animation to be run when the control enters a particular state. [[Animating Your Skin|See here for more information]]
|-
|- class="userrow"
! camera
| class="usercell" | '''camera'''
| Specifies the location (relative to the parent's coordinates) of the camera.  Useful for the 3D animations such as rotatey.  Format is <code><camera x="20" y="30" /></code>
| class="usercell" | Specifies the location (relative to the parent's coordinates) of the camera.  Useful for the 3D animations such as rotatey.  Format is <camera x="20" y="30" />
|-
|- class="userrow"
! colordiffuse
| class="usercell" | '''colordiffuse'''
| This specifies the color to be used for the texture basis. It's in hex AARRGGBB format. If you define <code><colordiffuse>FFFF00FF</colordiffuse></code> (magenta), the image will be given a magenta tint when rendered. Defaults to FFFFFFFF (no tint).  You can also specify this as a name from the [[Colour Themes|colour theme.]]
| class="usercell" | This specifies the color to be used for the texture basis. It's in hex AARRGGBB format. If you define <colordiffuse>FFFF00FF</colordiffuse> (magenta), the image will be given a magenta tint when rendered. Defaults to FFFFFFFF (no tint).  You can also specify this as a name from the [[Colour Themes|colour theme.]]
|}
|}


Line 42: Line 41:
In addition, any control that is focusable (e.g. a buttoncontrol) will have the following tags available.
In addition, any control that is focusable (e.g. a buttoncontrol) will have the following tags available.


{| class="dtable" border="0"
{| class="wikitable"
|- class="userrow"
! onup
| class="usercell" | '''onup'''
| Specifies the <code><id></code> of the control that should be moved to when the user moves up off this control.  Can point to a control group (which remembers previous focused items).
| class="usercell" | Specifies the <id> of the control that should be moved to when the user moves up off this control.  Can point to a control group (which remembers previous focused items).
|-
|- class="userrow"
! ondown
| class="usercell" | '''ondown'''
| Specifies the <code><id></code> of the control that should be moved to when the user moves down off this control.  Can point to a control group (which remembers previous focused items).
| class="usercell" | Specifies the <id> of the control that should be moved to when the user moves down off this control.  Can point to a control group (which remembers previous focused items).
|-
|- class="userrow"
! onleft
| class="usercell" | '''onleft'''
| Specifies the <code><id></code> of the control that should be moved to when the user moves left off this control.  Can point to a control group (which remembers previous focused items).
| class="usercell" | Specifies the <id> of the control that should be moved to when the user moves left off this control.  Can point to a control group (which remembers previous focused items).
|-
|- class="userrow"
! onright
| class="usercell" | '''onright'''
| Specifies the <code><id></code> of the control that should be moved to when the user moves right off this control.  Can point to a control group (which remembers previous focused items).
| class="usercell" | Specifies the <id> of the control that should be moved to when the user moves right off this control.  Can point to a control group (which remembers previous focused items).
|-
|- class="userrow"
! hitrect
| class="usercell" | '''hitrect'''
| Specifies the location and size of the "focus area" of this control (relative to the parent's coordinates) used by the mouse cursor. Format is <code><hitrect x="20" y="30" w="50" h="10" /></code>
| class="usercell" | Specifies the location and size of the "focus area" of this control (relative to the parent's coordinates) used by the mouse cursor. Format is <hitrect x="20" y="30" w="50" h="10" />
|-
|- class="userrow"
! enable
| class="usercell" | '''enable'''
| Specifies a condition as to when this control will be enabled. Can be true, false, or a condition. [[Conditional Visibility|See here for&nbsp;more information.]]  Defaults to true.
| class="usercell" | Specifies a condition as to when this control will be enabled. Can be true, false, or a condition. [[Conditional Visibility|See here for&nbsp;more information.]]  Defaults to true.
|-
|- class="userrow"
! pulseonselect
| class="usercell" | '''pulseonselect'''
| This specifies whether or not a button type will "pulse" when it has focus.  This is done by varying the alpha channel of the button.  Defaults to true.
| class="usercell" | This specifies whether or not a button type will "pulse" when it has focus.  This is done by varying the alpha channel of the button.  Defaults to true.
|}
|}


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

Revision as of 08:27, 20 September 2011

Here are the tags and attributes available for all controls. Note that they're all lowercase, as XML is case sensitive.

=== Tags available to all controls ===!

description Only used to make things clear for the skinner. Not read by XBMC at all.
type The type of 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. Any controls that the skinner specifies content needs not have an id unless it's needed for animation purposes. For instance, most image and label controls don't need an id if the skinner specifies they're content.
posx Specifies where the left edge of the control should be drawn, relative to it's parent's left edge. If an "r" is included (eg 180r) then the measurement is taken from the parent's right edge (in the left direction).
posy Specifies where the top edge of the control should be drawn, relative to it's parent's top edge. If an "r" is included (eg 180r) then the measurement is taken from the parent's bottom edge (in the up direction).
width Specifies the width that should be used to draw the control.
height Specifies the height that should be used to draw the control.
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
camera Specifies the location (relative to the parent's coordinates) of the camera. Useful for the 3D animations such as rotatey. Format is <camera x="20" y="30" />
colordiffuse This specifies the color to be used for the texture basis. It's in hex AARRGGBB format. If you define <colordiffuse>FFFF00FF</colordiffuse> (magenta), the image will be given a magenta tint when rendered. Defaults to FFFFFFFF (no tint). You can also specify this as a name from the colour theme.

Tags available to focusable controls

In addition, any control that is focusable (e.g. a buttoncontrol) will have the following tags available.

onup Specifies the <id> of the control that should be moved to when the user moves up off this control. Can point to a control group (which remembers previous focused items).
ondown Specifies the <id> of the control that should be moved to when the user moves down off this control. Can point to a control group (which remembers previous focused items).
onleft Specifies the <id> of the control that should be moved to when the user moves left off this control. Can point to a control group (which remembers previous focused items).
onright Specifies the <id> of the control that should be moved to when the user moves right off this control. Can point to a control group (which remembers previous focused items).
hitrect Specifies the location and size of the "focus area" of this control (relative to the parent's coordinates) used by the mouse cursor. Format is <hitrect x="20" y="30" w="50" h="10" />
enable Specifies a condition as to when this control will be enabled. Can be true, false, or a condition. See here for more information. Defaults to true.
pulseonselect This specifies whether or not a button type will "pulse" when it has focus. This is done by varying the alpha channel of the button. Defaults to true.