For control a radio button (as used for on/off settings).
Class: ControlRadioButton(x, y, width, height, label[, focusOnTexture, noFocusOnTexture,
focusOffTexture, noFocusOffTexture,
textOffsetX, textOffsetY, alignment, font, textColor, disabledColor])
The radio button control is used for creating push button on/off settings in Kodi. You can choose the position, size, and look of the button. When the user clicks on the radio button, the state will change, toggling the extra textures (textureradioon and textureradiooff). Used for settings controls.
x | integer - x coordinate of control. | |||||||||||||||||||||
y | integer - y coordinate of control. | |||||||||||||||||||||
width | integer - width of control. | |||||||||||||||||||||
height | integer - height of control. | |||||||||||||||||||||
label | string or unicode - text string. | |||||||||||||||||||||
focusOnTexture | [opt] string - filename for radio ON focused texture. | |||||||||||||||||||||
noFocusOnTexture | [opt] string - filename for radio ON not focused texture. | |||||||||||||||||||||
focusOfTexture | [opt] string - filename for radio OFF focused texture. | |||||||||||||||||||||
noFocusOffTexture | [opt] string - filename for radio OFF not focused texture. | |||||||||||||||||||||
textOffsetX | [opt] integer - horizontal text offset | |||||||||||||||||||||
textOffsetY | [opt] integer - vertical text offset | |||||||||||||||||||||
alignment | [opt] integer - alignment of label
| |||||||||||||||||||||
font | [opt] string - font used for label text. (e.g. 'font13') | |||||||||||||||||||||
textColor | [opt] hexstring - color of label when control is enabled. radiobutton's label. (e.g. '0xFFFFFFFF') | |||||||||||||||||||||
disabledColor | [opt] hexstring - color of label when control is disabled. (e.g. '0xFFFF3300') |
Example:
setSelected | ( | ... | ) |
Function: setSelected(selected)
selected | bool - True=selected (on) / False=not selected (off) |
Example:
isSelected | ( | ) |
Function: isSelected()
Example:
setLabel | ( | ... | ) |
Function: setLabel(label[, font, textColor, disabledColor, shadowColor, focusedColor])
label | string or unicode - text string. |
font | [opt] string - font used for label text. (e.g. 'font13') |
textColor | [opt] hexstring - color of enabled radio button's label. (e.g. '0xFFFFFFFF') |
disabledColor | [opt] hexstring - color of disabled radio button's label. (e.g. '0xFFFF3300') |
shadowColor | [opt] hexstring - color of radio button's label's shadow. (e.g. '0xFF000000') |
focusedColor | [opt] hexstring - color of focused radio button's label. (e.g. '0xFFFFFF00') |
Example:
setRadioDimension | ( | ... | ) |
Function: setRadioDimension(x, y, width, height)
x | integer - x coordinate of radio texture. |
y | integer - y coordinate of radio texture. |
width | integer - width of radio texture. |
height | integer - height of radio texture. |
Example: