Progress Control: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>DonJ
No edit summary
 
(18 intermediate revisions by 11 users not shown)
Line 1: Line 1:
<section begin="main content" />
The progress control is used to show the progress of an item that may take a long time, or to show how far through a movie you are. You can choose the position, size, and look of the progress control.
The progress control is used to show the progress of an item that may take a long time, or to show how far through a movie you are. You can choose the position, size, and look of the progress control.
===Example===
=== Example ===
<xml>
<syntaxhighlight lang="xml" enclose="div">
<control>
<control type="progress" id="12">
       <description>My first progress control</description>
       <description>My first progress control</description>
       <type>progress</type>
       <left>80</left>
      <id>1</id>
       <top>60</top>
      <posx>80</posx>
       <posy>60</posy>
       <width>250</width>
       <width>250</width>
       <height>30</height>
       <height>30</height>
       <visible>true</visible>
       <visible>true</visible>
      <reveal>false</reveal>
       <texturebg>mybackgroundtexture.png</texturebg>
       <texturebg>mybackgroundtexture.png</texturebg>
       <textureleft>mydowntexture.png</textureleft>
       <lefttexture>mydowntexture.png</lefttexture>
       <texturemid>mymidtexture.png</texturemid>
       <midtexture>mymidtexture.png</midtexture>
       <textureright>myrighttexture.png</textureright>
       <righttexture>myrighttexture.png</righttexture>
       <textureoverlay>myoverlaytexture.png</textureoverlay>
       <overlaytexture>myoverlaytexture.png</overlaytexture>
       <info></info>
       <info></info>
</control>
</control>
</xml>
</syntaxhighlight>
===Available Tags===
 
Note that each tag is '''lower case only.''' This is important, as xml tags are case-sensitive.
=== Available tags ===
{| class="dtable"
In addition to the [[Default Control Tags]] the following tags are available. Note that each tag is '''lower case''' only. This is important, as xml tags are case-sensitive.
|- class="userrow"
{| class="prettytable"
| class="usercell" | '''description'''
! Tag !! Description
| class="usercell" | Only used to make things clear for the skinner. Not read by XBMC at all.
|-  
|- class="userrow"
| '''reveal'''
| class="usercell" | '''type'''
| If set to true the midtexture will reveal itself instead of stretching to fill the gap (works best when its the same size as texturebg)
| class="usercell" | Should be progress for a progress control.
|-  
|- class="userrow"
| '''texturebg'''
| 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. The progress control's id should be unique, except where the <info> tag is used to fill the contents.
Specifies the image file which should be displayed in the background of the progress control. [[Texture Attributes|See here for additional information about textures.]]
|- class="userrow"
|-  
| class="usercell" | '''posx'''
| '''lefttexture'''
| class="usercell" | Specifies where the left edge of the progress control should be drawn. This is offset from the window's coordinates (normally the left edge of the screen, or 0).
| Specifies the image file which should be displayed for the left side of the progress bar. This is rendered on the left side of the bar.
|- class="userrow"
|-  
| class="usercell" | '''posy'''
| '''midtexture'''
| class="usercell" | Specifies where the top edge of the progress control should be drawn. This is offset from the window's coordinates (normally the top edge of the screen, or 0).
| Specifies the image file which should be displayed for the middle portion of the progress bar. This is the “fill” texture used to fill up the bar. It's positioned on the right of the <lefttexture> texture, and fills the gap between the <lefttexture> and <righttexture> textures, depending on how far progressed the item is.
|- class="userrow"
|-  
| class="usercell" | '''width'''
| '''righttexture'''
| class="usercell" | Specifies the width of the progress bar. The <texturebg> image will be scaled to fit this width, and all other images will be scaled by the same amount.
| Specifies the image file which should be displayed for the right side of the progress bar. This is rendered on the right side of the bar.
|- class="userrow"
|-  
| class="usercell" | '''height'''
| '''overlaytexture'''
| class="usercell" | Specifies the height of the progress bar. The <texturebg> image will be scaled to fit this height, and all other images will be scaled by the same amount.
| Specifies the image file which should be displayed over the top of all other images in the progress bar. It is centered vertically and horizontally within the space taken up by the background image.
|- class="userrow"
|-  
| class="usercell" | '''visible'''
| '''info'''
| 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"
| class="usercell" | '''animation'''
| 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"
| class="usercell" | '''texturebg'''
| class="usercell" |
Specifies the image file which should be displayed in the background of the progress control. 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.
|- class="userrow"
| class="usercell" | '''textureleft'''
| class="usercell" | Specifies the image file which should be displayed for the left side of the progress bar. This is rendered on the left side of the bar.
|- class="userrow"
| class="usercell" | '''texturemid'''
| class="usercell" | Specifies the image file which should be displayed for the middle portion of the progress bar. This is the “fill” texture used to fill up the bar. It's positioned on the right of the <textureleft> texture, and fills the gap between the <textureleft> and <textureright> textures, depending on how far progressed the item is.
|- class="userrow"
| class="usercell" | '''textureright'''
| class="usercell" | Specifies the image file which should be displayed for the right side of the progress bar. This is rendered on the right side of the bar.
|- class="userrow"
| class="usercell" | '''textureoverlay'''
| class="usercell" | Specifies the image file which should be displayed over the top of all other images in the progress bar. It is centered vertically and horizontally within the space taken up by the background image.
|- class="userrow"
| class="usercell" | '''info'''
| class="usercell" |
Specifies the information that the progress bar is reporting on. [[InfoLabels|See here for more information.]]
Specifies the information that the progress bar is reporting on. [[InfoLabels|See here for more information.]]
|
|-
|  '''info2'''
|
Specifies the second piece of information that the progress bar is reporting on (PVR only). [[InfoLabels|See here for more information.]]
|}
|}
[[category:Skin Development]]
 
<section end="main content" />
 
== See also ==
'''Development:'''
* [[Add-on development]]
* [[Skinning]]
 
[[Category:Skin development]]

Latest revision as of 21:57, 8 February 2019

The progress control is used to show the progress of an item that may take a long time, or to show how far through a movie you are. You can choose the position, size, and look of the progress control.

Example

<control type="progress" id="12">
      <description>My first progress control</description>
      <left>80</left>
      <top>60</top>
      <width>250</width>
      <height>30</height>
      <visible>true</visible>
      <reveal>false</reveal>
      <texturebg>mybackgroundtexture.png</texturebg>
      <lefttexture>mydowntexture.png</lefttexture>
      <midtexture>mymidtexture.png</midtexture>
      <righttexture>myrighttexture.png</righttexture>
      <overlaytexture>myoverlaytexture.png</overlaytexture>
      <info></info>
</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.

Tag Description
reveal If set to true the midtexture will reveal itself instead of stretching to fill the gap (works best when its the same size as texturebg)
texturebg

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

lefttexture Specifies the image file which should be displayed for the left side of the progress bar. This is rendered on the left side of the bar.
midtexture Specifies the image file which should be displayed for the middle portion of the progress bar. This is the “fill” texture used to fill up the bar. It's positioned on the right of the <lefttexture> texture, and fills the gap between the <lefttexture> and <righttexture> textures, depending on how far progressed the item is.
righttexture Specifies the image file which should be displayed for the right side of the progress bar. This is rendered on the right side of the bar.
overlaytexture Specifies the image file which should be displayed over the top of all other images in the progress bar. It is centered vertically and horizontally within the space taken up by the background image.
info

Specifies the information that the progress bar is reporting on. See here for more information.

info2

Specifies the second piece of information that the progress bar is reporting on (PVR only). See here for more information.


See also

Development: