Kodi ——6 Controls (6) Radio button Control

来源:互联网 发布:mac制作 win7安装u盘 编辑:程序博客网 时间:2024/05/17 04:38

6.6 Radio button Control

     Radio 按钮控件用于开/关XBMC设置创建按钮您可以选择的位置,大小,和按钮的外观用户点击Radio按钮,状态会发生变化,触发额外的纹理(textureradioontextureradiooff用于设置的控制

6.6.1 Example

<control type="radiobutton" id="2">      <description>My first radiobutton control</description>      <type>radiobutton</type>      <left>80</left>      <top>60</top>      <width>250</width>      <height>200</height>      <visible>true</visible>      <colordiffuse>FFFFFFFF</colordiffuse>      <texturefocus>myfocustexture.png</texturefocus>      <texturenofocus>mynormaltexture.png</texturenofocus>      <textureradioonfocus colordiffuse="FFFFAAFF">myradiobutton.png</textureradioonfocus>      <textureradioonnofocus colordiffuse="FFFFAAFF">myradiobutton.png</textureradioonnofocus>      <textureradioofffocus colordiffuse="FFFFAAFF">myradiobutton_nf.png</textureradioofffocus>      <textureradiooffnofocus colordiffuse="FFFFAAFF">myradiobutton_nf.png</textureradiooffnofocus>      <selected>Player.Paused</selected>      <onclick>PlayerControls(Pause)</onclick>      <label>29</label>      <font>font12</font>      <textcolor>FFFFFFFF</textcolor>      <focusedcolor>FFFFFFFF</focusedcolor>      <disabledcolor>80FFFFFF</disabledcolor>      <align>left</align>      <aligny>center</aligny>      <textoffsetx>4</textoffsetx>      <textoffsety>5</textoffsety>      <pulseonselect>false</pulseonselect>      <onfocus>-</onfocus>      <onunfocus>-</onunfocus>      <onup>2</onup>      <ondown>3</ondown>      <onleft>1</onleft>      <onright>1</onright></control>

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

TagDescriptiontexturefocus

Specifies the image file which should be displayed when the button has focus. See here for additional information about textures.

texturenofocusSpecifies the image file which should be displayed when the button does not have focus.textureradioonfocusSpecifies the image file which should be displayed for the radio button portion when it's the button is on and focused. This texture is positioned on the right of the button – it's positioned 24 pixels from the right edge of the button, and 8 pixels above the center vertically.textureradioonnofocusSpecifies the image file which should be displayed for the radio button portion when it's the button is on and unfocused. This texture is positioned on the right of the button – it's positioned 24 pixels from the right edge of the button, and 8 pixels above the center vertically.textureradioonA shortcut to set both of the above textures to the same image file.textureradioondisabledSpecifies the image file which should be displayed for the radio button portion when the button is on and disabled.textureradioofffocusSpecifies the image file which should be displayed for the radio button portion when the button is off and focused.textureradiooffnofocusSpecifies the image file which should be displayed for the radio button portion when the button is off and unfocused.textureradiooffA shortcut to set both of the above textures to the same image file.textureradioondisabledSpecifies the image file which should be displayed for the radio button portion when the button is off and disabled.labelThe label used on the button. It can be a link into strings.xml, or an actual text label.label2Optional. Will display an 'on' or 'off' label. Only available if you specify an empty radiowidth and radioheight.fontFont used for the button label. From fonts.xml.textcolorColor used for displaying the button label. In AARRGGBB hex format, or a name from thecolour theme.focusedcolorColor used for the button label when the button has in focus. In AARRGGBB hex format or a name from thecolour theme.disabledcolorColor used for the button label if the button is disabled. In AARRGGBB hex format, or a name from thecolour theme.shadowcolorSpecifies the color of the drop shadow on the text, in AARRGGBB format, or a name from thecolour theme.alignLabel horizontal alignment on the button. Defaults to left, can also be center or right.alignyLabel vertical alignment on the button. Defaults to top, can also be center.textoffsetxAmount to offset the label from the left (or right) edge of the button when using left or right alignment.textoffsetyAmount to offset the label from the top edge of the button when using top alignment.textwidthWill truncate any text that's too long.selectedThe boolean condition that when met will cause the control to become selected.see here for more information.onclickThe function to perform when the radio button is clicked. Should be a built in function.radioposxX offset of the dot or radio button itselfradioposyY offset of the dot or radio button itselfradiowidthWidth in Pixels of the dot or radio button itselfradioheightHeight in Pixels of the dot or radio button itselfonfocusSpecifies the action to perform when the button is focused. Should be a built in function. The action is performed after any focus animations have completed.See here for more information.onunfocusSpecifies the action to perform when the button loses focus. Should be a built in function.

0 0
原创粉丝点击