Settings Slider Control: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
m (Robot: Changing Category:Skin Development to Category:Skin development)
Line 74: Line 74:
|  '''textoffsetx'''
|  '''textoffsetx'''
|  Amount to offset the label from the left edge of the control.
|  Amount to offset the label from the left edge of the control.
|-
|  '''textwidth'''
|  Will truncate any text that's too long. 
|-  
|-  
|  '''info'''
|  '''info'''

Revision as of 00:38, 22 January 2019

The settings slider control is used in the settings screens for when an option is best specified on a sliding scale. You can choose the position, size, and look of the slider control. It is basically a cross between the button control and a slider control. It has a label and focus and non focus textures, as well as a slider control on the right.

Example

<control type="sliderex" id="12">
      <description>My first settings slider control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <sliderwidth>100</sliderwidth>
      <sliderheight>20</sliderheight>
      <visible>true</visible>
      <texturefocus>myfocustexture.png</texturefocus>
      <texturenofocus>mynofocustexture.png</texturenofocus>
      <texturebg>mybackgroundtexture.png</texturebg>
      <textureslidernib>mydowntexture.png</textureslidernib>
      <textureslidernibfocus>mydownfocustexture.png</textureslidernibfocus>
      <info></info>
      <label>46</label>
      <font>font12</font>
      <textcolor>FFFFFFFF</textcolor>
      <disabledcolor>80FFFFFF</disabledcolor>
      <textoffsetx></textoffsetx>
      <pulseonselect></pulseonselect>
      <onup>2</onup>
      <ondown>3</ondown>
      <onleft>1</onleft>
      <onright>1</onright>
</control>

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.

Tag Description
sliderwidth Specifies the width of the slider portion of the slider control (ie without the text value, if present). The texture image for the slider background will be resized to fit into this width, and the nib textures will be resized by the same amount.
sliderheight Specifies the height of the slider portion of the slider control (ie without the text value, if present). The texture image for the slider background will be resized to fit into this height, and the nib textures will be resized by the same amount.
texturefocus

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

texturenofocus Specifies the image file which should be displayed for the control when it doesn't focus.
texturebg Specifies the image file which should be displayed in the background of the slider portion of the control. Will be positioned so that the right edge is <textoffsetx> away from the right edge of the <texturefocus> image, and centered vertically.
textureslidernib Specifies the image file which should be displayed for the slider nib.
textureslidernibfocus Specifies the image file which should be displayed for the slider nib when it has focus.
label Either a numeric reference into strings.xml (for localization), or a string that will be shown on the left of the control.
font Font used for the controls label. From fonts.xml.
textcolor Color used for displaying the label. In AARRGGBB hex format, or a name from the colour theme.
disabledcolor Color used for the label if the control is disabled. In AARRGGBB hex format, or a name from the colour theme.
shadowcolor Specifies the color of the drop shadow on the text. In AARRGGBB hex format, or a name from the colour theme.
textoffsetx Amount to offset the label from the left edge of the control.
textwidth Will truncate any text that's too long.
info

Specifies the information that the slider controls. See here for more information.

See also

Development: