您的位置:首页 > 其它

Kodi ——6 Controls (2) Fade Label Control

2016-06-14 11:19 363 查看

6.2 淡入淡出Fade Label Control

   fade label 控件用于显示多个文字碎片在Kodi的同一个地方,你可以选择需要显示字体、大小、颜色、位置和文字的内容。第一条显示的信息将会在50帧内淡出,然后滑动到最左边,一旦滑动完整个屏幕结束后,第二段信息将会重复这个淡出的过程,Fade label控件不支持列表容器。

6.2.1 Example

<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>
<font>font14</font>
<textcolor>FFB2D4F5</textcolor>
<textoffsetx>20</textoffsetx>
<scroll>true</scroll>
<randomize>true</randomize>
</control>

6.2.2 标签描述

  除了默认控件标签,下面的标签都是可用的。注意,标签只支持小写,xml文件是大小写敏感的。

标签描述
label指定需要绘制的文本,在这里需要在string.xml中定义条目,你也可以自己指定一段文字,但当然这不会是本地化的。你也可以通过使用$INFO和$LOCALIZE格式指定多个信息。


info指定一段要显示的信息,指定应显示的信息。科迪会自动填充这个信息代替
<label>
.

See here for more information.
font从font.xml中指定字体。
textcolor指定文字的颜色, in hex AARRGGBB format, or a name from the
colour theme.
textoffsetx指定的文本静态(不滚动)时呈现的左边缘的偏移量。滚动文本仍将使用全<width>控件进行滚动。
shadowcolor指定文字阴影的颜色, in AARRGGBB format, or a name from the
colour theme.
angleSpecifies the angle at which the text should be drawn, measured counter clockwise from the horizontal.
scrolloutIf 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.
pauseatendSpecifies the time that the text will wait until it fades away before it scrolls again or moves to the next item.
resetonlabelchangeIf 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.
scrollspeedScroll speed of text in pixels per second. Defaults to 60.
scrollIf set to false, the labels won't scroll. Defaults to true.
randomizeIf set to true, the labels will be displayed in a random order. Defaults to false.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: