Difference between revisions of "Fade label control"

From Official Kodi Wiki
Jump to: navigation, search
m (syntaxhighlighter fix)
Line 2: Line 2:
 
The fade label control is used for displaying multiple pieces of text in the same space in Kodi. You can choose the font, size, colour, location and contents of the text to be displayed. The first piece of information to display fades in over 50 frames, then scrolls off to the left. Once it is finished scrolling off screen, the second piece of information fades in and the process repeats. A fade label control is not supported in a list container.
 
The fade label control is used for displaying multiple pieces of text in the same space in Kodi. You can choose the font, size, colour, location and contents of the text to be displayed. The first piece of information to display fades in over 50 frames, then scrolls off to the left. Once it is finished scrolling off screen, the second piece of information fades in and the process repeats. A fade label control is not supported in a list container.
 
=== Example ===
 
=== Example ===
<syntaxhighlight lang="XML" enclose="div">
+
<syntaxhighlighter lang=xml enclose="div">
 
   <control type="fadelabel" id="1">
 
   <control type="fadelabel" id="1">
 
         <description>My First fadelabel</description>
 
         <description>My First fadelabel</description>
Line 22: Line 22:
 
         <randomize>true</randomize>
 
         <randomize>true</randomize>
 
   </control>
 
   </control>
</syntaxhighlight>
+
</syntaxhighlighter>
  
 
=== Tag descriptions ===
 
=== Tag descriptions ===

Revision as of 12:34, 10 July 2018

The fade label control is used for displaying multiple pieces of text in the same space in Kodi. You can choose the font, size, colour, location and contents of the text to be displayed. The first piece of information to display fades in over 50 frames, then scrolls off to the left. Once it is finished scrolling off screen, the second piece of information fades in and the process repeats. A fade label control is not supported in a list container.

1 Example

<syntaxhighlighter lang=xml enclose="div">

 <control type="fadelabel" id="1">
       <description>My First fadelabel</description>
       <left>80</left>
       <top>60</top>
       <width>250</width>
       <visible>true</visible>
       <scrollout>true</scrollout>
       <pauseatend>200</pauseatend>
       <label>6</label>
       <info>MusicPlayer.Genre</info>
       <info>MusicPlayer.Artist</info>
       <info>MusicPlayer.Album</info>
       <info>MusicPlayer.Year</info>
       font14
       <textcolor>FFB2D4F5</textcolor>
       <textoffsetx>20</textoffsetx>
       <scroll>true</scroll>
       <randomize>true</randomize>
 </control>

</syntaxhighlighter>

2 Tag descriptions

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.

Tags Description
label

Specifies the text which should be drawn. You should specify an entry from the strings.xml here, however you may also specify a piece of text yourself if you wish, though ofcourse it will not be localisable. You may also specify more than one piece of information here by using the $INFO and $LOCALIZE formats.

info

Specifies the information that should be presented. Kodi will auto-fill in this info in place of the <label>. See here for more information.

font Specifies the font to use from the font.xml file.
textcolor Specified the color the text should be, in hex AARRGGBB format, or a name from the colour theme.
textoffsetx Specify the offset from the left edge that the text should be rendered at when static (not scrolling). The scrolling text will still scroll using the full <width> of the control.
shadowcolor Specifies the color of the drop shadow on the text, in AARRGGBB format, or a name from the colour theme.
angle Specifies the angle at which the text should be drawn, measured counter clockwise from the horizontal.
scrollout If set to False the fadelabel will only scroll until the last char is to the right side of the width of the fadelabel instead of all the way out to the left. Defaults to true
pauseatend Specifies the time that the text will wait until it fades away before it scrolls again or moves to the next item.
resetonlabelchange If set to false the fadelabel will not reset the scrolling offset when the label's content changes. Useful if you have things such as the play time (in seconds) inside a fadelabel. Defaults to true.
scrollspeed Scroll speed of text in pixels per second. Defaults to 60.
scroll If set to false, the labels won't scroll. Defaults to true.
randomize If set to true, the labels will be displayed in a random order. Defaults to false.


3 See also

Development: