Resize control: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>DonJ
No edit summary
>Jmarshall
No edit summary
Line 2: Line 2:
===Example===
===Example===
<xml>
<xml>
<control>
<control type="resize" id="3">
       <description>My first resize control</description>
       <description>My first resize control</description>
      <type>resize</type>
      <id>1</id>
       <posx>80</posx>
       <posx>80</posx>
       <posy>60</posy>
       <posy>60</posy>
Line 16: Line 14:
</xml>
</xml>
===Available Tags===
===Available Tags===
Note that each tag is '''lower case only.''' This is important, as xml tags are case-sensitive.
In addition to the [[Default_Control_Tags|default control tags]], the following tags are available.  Note that each tag is '''lower case only.''' This is important, as xml tags are case-sensitive.
{| class="dtable"
{| class="dtable"
|- class="userrow"
| class="usercell" | '''description'''
| class="usercell" | Only used to make things clear for the skinner. Not read by XBMC at all.
|- class="userrow"
| class="usercell" | '''type'''
| class="usercell" | Should be resize for an resize control.
|- class="userrow"
| class="usercell" | '''id'''
| 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. Most image controls can be id 0 or id 1, as the only information they display is specified either in the <texture> or <info> tags.
|- class="userrow"
| class="usercell" | '''posx'''
| class="usercell" | Specifies where the left edge of the image should be drawn. This is offset from the window's coordinates (normally the left edge of the screen, or 0). As the resize control is always centered, this is ignored.
|- class="userrow"
| class="usercell" | '''posy'''
| class="usercell" | Specifies where the top edge of the image should be drawn. This is offset from the window's coordinates (normally the top edge of the screen, or 0). As the resize control is always centered, this is ignored.
|- class="userrow"
| class="usercell" | '''width'''
| class="usercell" | Specifies the width that should be used to draw the image. The resizer will be resized to fit into this width.
|- class="userrow"
| class="usercell" | '''height'''
| class="usercell" | Specifies the height that should be used to draw the image. The resizer will be resized to fit into this height.
|- class="userrow"
|- class="userrow"
| class="usercell" | '''texturefocus'''
| class="usercell" | '''texturefocus'''
| class="usercell" |
| class="usercell" |
Specifies the image file which should be displayed when the resizer has focus. 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 compresses Textures.xpr file, and if not found, will look inside the media/ folder for the actual skin file. Compressing textures into Textures.xpr means far faster loading times.  
Specifies the image file which should be displayed when the resizer has focus. [[Texture Attributes|See here for additional information about textures.]]
|- class="userrow"
|- class="userrow"
| class="usercell" | '''texturenofocus'''
| class="usercell" | '''texturenofocus'''
| class="usercell" | Specifies the image file which should be displayed when the resizer does not have focus.
| class="usercell" | Specifies the image file which should be displayed when the resizer does not have focus.
|- class="userrow"
| class="usercell" | '''pulseonselect'''
| class="usercell" | If true, the resizer will “pulse” when selected.
|}
|}
[[category:Skin Development]]
[[category:Skin Development]]

Revision as of 03:59, 24 July 2007

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

<xml> <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> </xml>

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.