Text Box: 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="textbox" id="2">
       <description>My first text box control</description>
       <description>My first text box control</description>
      <type>textbox</type>
      <id>1</id>
       <posx>80</posx>
       <posx>80</posx>
       <posy>60</posy>
       <posy>60</posy>
Line 14: Line 12:
       <font>font13</font>
       <font>font13</font>
       <textcolor>FFFFFFFF</textcolor>
       <textcolor>FFFFFFFF</textcolor>
      <spinposx>220</spinposx>
      <spinposy>180</spinposy>
      <spinwidth>16</spinwidth>
      <spinheight>16</spinheight>
      <spincolor>FFFFFFFF</spincolor>
      <textureup>myuptexture.png</textureup>
      <textureupfocus>myuptexture.png</textureupfocus>
      <texturedown>myuptexture.png</texturedown>
      <texturedownfocus>myuptexture.png</texturedownfocus>
       <pulseonselect></pulseonselect>
       <pulseonselect></pulseonselect>
       <onup>2</onup>
       <pagecontrol>13</pagecontrol>
      <ondown>3</ondown>
      <onleft>1</onleft>
      <onright>1</onright>
</control>
</control>
</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]] 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 textbox for a text box 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. As text box contents are filled by XBMC, this needs to be the appropriate number for the window that the control resides in.
|- class="userrow"
| class="usercell" | '''posx'''
| class="usercell" | Specifies where the left edge of the text should be drawn. This is offset from the window's coordinates (normally the left edge of the screen, or 0).
|- class="userrow"
| class="usercell" | '''posy'''
| class="usercell" | Specifies where the top edge of the text should be drawn. This is offset from the window's coordinates (normally the top edge of the screen, or 0).
|- class="userrow"
| class="usercell" | '''width'''
| class="usercell" | Specifies the total width of the text.
|- class="userrow"
| class="usercell" | '''height'''
| class="usercell" | Specifies the total height of the text.
|- class="userrow"
| class="usercell" | '''visible'''
| 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="userrow"
| class="usercell" | '''font'''
| class="usercell" | '''font'''
Line 67: Line 24:
|- class="userrow"
|- class="userrow"
| class="usercell" | '''textcolor'''
| class="usercell" | '''textcolor'''
| class="usercell" | Color used for displaying the text. In AARRGGBB hex format.
| class="usercell" | Color used for displaying the text. In AARRGGBB hex format, or a name from the [[Colour Themes|colour theme.]]
|- class="userrow"
|- class="userrow"
| class="usercell" | '''shadowcolor'''
| class="usercell" | '''shadowcolor'''
| class="usercell" | Specifies the color of the drop shadow on the text, in AARRGGBB format.
| class="usercell" | Specifies the color of the drop shadow on the text. In AARRGGBB format, or a name from the [[Colour Themes|colour theme.]]
|- class="userrow"
| class="usercell" | '''spinposx'''
| class="usercell" | The horizontal position of the spin control for multipage textboxes. This is offset from the top left of the textbox.
|- class="userrow"
| class="usercell" | '''spinposy'''
| class="usercell" | The vertical position of the spin control for multipage textboxes. This is offset from the top left of the textbox.
|- class="userrow"
| class="usercell" | '''spinwidth'''
| class="usercell" | The width of one of the spin control buttons. The textures for this spin control will be scaled to fit this width.
|- class="userrow"
| class="usercell" | '''spinheight'''
| class="usercell" | The height of one of the spin control buttons. The textures for this spin control will be scaled to fit this height.
|- class="userrow"
| class="usercell" | '''spincolor'''
| class="usercell" | The colour of the text used for this spin control. In AARRGGBB hex format.
|- class="userrow"
| class="usercell" | '''textureup'''
| class="usercell" | The up button texture for the spin control.
|- class="userrow"
| class="usercell" | '''textureupfocus'''
| class="usercell" | The up button texture for the spin control when it's focused.
|- class="userrow"
| class="usercell" | '''texturedown'''
| class="usercell" | The down button texture for the spin control.
|- class="userrow"
| class="usercell" | '''texturedownfocus'''
| class="usercell" | The down button texture for the spin control when it's focused.
|- class="userrow"
| class="usercell" | '''pulseonselect'''
| class="usercell" | Specifies whether the spinbutton should pulse when it's selected. Defaults to true.
|- class="userrow"
| class="usercell" | '''onup'''
| class="usercell" | Control id to move to when the user moves up off this control.
|- class="userrow"
| class="usercell" | '''ondown'''
| class="usercell" | Control id to move to when the user moves down off this control.
|- class="userrow"
| class="usercell" | '''onleft'''
| class="usercell" | Control id to move to when the user moves left off this control.
|- class="userrow"
|- class="userrow"
| class="usercell" | '''onright'''
| class="usercell" | '''pagecontrol'''
| class="usercell" | Control id to move to when the user moves right off this control.
| class="usercell" | 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]].
|}
|}
[[category:Skin Development]]
[[category:Skin Development]]

Revision as of 06:32, 24 July 2007

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

<xml> <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>
     font13
     <textcolor>FFFFFFFF</textcolor>
     <pulseonselect></pulseonselect>
     <pagecontrol>13</pagecontrol>

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

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.