Text Box

From Official Kodi Wiki
Revision as of 23:30, 24 January 2007 by >DonJ
Jump to navigation Jump to search

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>

     <description>My first text box control</description>
     <type>textbox</type>
     <id>1</id>
     <posx>80</posx>
     <posy>60</posy>
     <width>250</width>
     <height>200</height>
     <visible>true</visible>
     <colordiffuse>FFFFFFFF</colordiffuse>
     font13
     <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>
     <onup>2</onup>
     <ondown>3</ondown>
     <onleft>1</onleft>
     <onright>1</onright>

</control> </xml>

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 textbox for a text box 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. As text box contents are filled by XBMC, this needs to be the appropriate number for the window that the control resides in.
posx 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).
posy 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).
width Specifies the total width of the text.
height Specifies the total height of the text.
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.

font Font used for the items first label. From fonts.xml.
textcolor Color used for displaying the text. In AARRGGBB hex format.
shadowcolor Specifies the color of the drop shadow on the text, in AARRGGBB format.
spinposx The horizontal position of the spin control for multipage textboxes. This is offset from the top left of the textbox.
spinposy The vertical position of the spin control for multipage textboxes. This is offset from the top left of the textbox.
spinwidth The width of one of the spin control buttons. The textures for this spin control will be scaled to fit this width.
spinheight The height of one of the spin control buttons. The textures for this spin control will be scaled to fit this height.
spincolor The colour of the text used for this spin control. In AARRGGBB hex format.
textureup The up button texture for the spin control.
textureupfocus The up button texture for the spin control when it's focused.
texturedown The down button texture for the spin control.
texturedownfocus The down button texture for the spin control when it's focused.
pulseonselect Specifies whether the spinbutton should pulse when it's selected. Defaults to true.
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.