Kodi ——6 Controls (2) Fade Label Control

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值