Kodi ——6 Controls (10)6.10 Slider Control

本文介绍了滑块控件的基本配置方法,包括位置、尺寸及外观等属性设置,并提供了XML示例代码。此外还详细解释了特有的XML标签,如背景纹理、滑块样式及其焦点状态下的样式。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

6.10 滑块控件

滑块控制用于手动操作的滑动条(如音量控制或进度控制)。您可以选择的位置,大小,以及滑动控件的外观。

6.10.1 Example

<control type="slider" id="17">
      <description>My first slider control</description>
      <left>80</left>
      <top>60</top>
      <width>250</width>
      <height>30</height>
      <visible>true</visible>
      <texturesliderbar>mybackgroundtexture.png</texturesliderbar>
      <textureslidernib>mydowntexture.png</textureslidernib>
      <textureslidernibfocus>mydownfocustexture.png</textureslidernibfocus>
      <info></info>
      <action></action>
      <controloffsetx></controloffsetx>
      <controloffsety></controloffsety>
      <pulseonselect></pulseonselect>
      <onup>2</onup>
      <ondown>3</ondown>
      <onleft>1</onleft>
      <onright>1</onright>
</control>

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

TagDescription
texturesliderbar

Specifies the image file which should be displayed in the background of the slider control. See here for additional information about textures.

textureslidernibSpecifies the image file which should be displayed for the slider nib.尖端
textureslidernibfocusSpecifies the image file which should be displayed for the slider nib when it has focus.
controloffsetxAmount to offset the slider background texture from the left edge of the control. Only useful if a value is being rendered as well (ie in int or float mode).
controloffsetyAmount to offset the slider background texture from the top edge of the control.
infoSpecifies the information that the slider controls. See here for more information.
actionCan be 'volume' to adjust the volume or 'seek' to change the seek position.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值