![]() |
Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
|
For control a radio button (as used for on/off settings). More...
Modules | |
Font alignment flags | |
Flags for alignment. | |
Classes | |
class | XBMCAddon::xbmcgui::ControlRadioButton |
For control a radio button (as used for on/off settings).
Class: ControlRadioButton(x, y, width, height, label[, focusOnTexture, noFocusOnTexture,
focusOffTexture, noFocusOffTexture, focusTexture, noFocusTexture,
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. | |||||||||||||||||||||
focusTexture | [opt] string - filename for radio ON texture (deprecated, use focusOnTexture and noFocusOnTexture). | |||||||||||||||||||||
noFocusTexture | [opt] string - filename for radio OFF texture (deprecated, use focusOffTexture and noFocusOffTexture). | |||||||||||||||||||||
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:
bool XBMCAddon::xbmcgui::ControlRadioButton::isSelected | ( | ) |
Returns the radio buttons's selected status.
Example:
void XBMCAddon::xbmcgui::ControlRadioButton::setLabel | ( | ... | ) |
Set's the radio buttons text attributes.
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:
void XBMCAddon::xbmcgui::ControlRadioButton::setRadioDimension | ( | ... | ) |
Sets the radio buttons's radio texture's position and size.
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:
void XBMCAddon::xbmcgui::ControlRadioButton::setSelected | ( | ... | ) |
Sets the radio buttons's selected status.
selected | bool - True=selected (on) / False=not selected (off) |
Example: