![]() |
Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
|
A standard push button control. More...
Classes | |
class | XBMCAddon::xbmcgui::ControlButton |
Functions | |
XBMCAddon::xbmcgui::ControlButton::setLabel (...) | |
XBMCAddon::xbmcgui::ControlButton::setDisabledColor (...) | |
Set's this buttons disabled color. More... | |
XBMCAddon::xbmcgui::ControlButton::getLabel () | |
XBMCAddon::xbmcgui::ControlButton::getLabel2 () | |
A standard push button control.
Class: ControlButton(x, y, width, height, label[, focusTexture, noFocusTexture, textOffsetX, textOffsetY,
alignment, font, textColor, disabledColor, angle, shadowColor, focusedColor])
The button control is used for creating push buttons in Kodi. You can choose the position, size, and look of the button, as well as choosing what action(s) should be performed when pushed.
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. | |||||||||||||||||||||
focusTexture | [opt] string - filename for focus texture. | |||||||||||||||||||||
noFocusTexture | [opt] string - filename for no focus texture. | |||||||||||||||||||||
textOffsetX | [opt] integer - x offset of label. | |||||||||||||||||||||
textOffsetY | [opt] integer - y offset of label. | |||||||||||||||||||||
alignment | [opt] integer - alignment of label
| |||||||||||||||||||||
font | [opt] string - font used for label text. (e.g. 'font13') | |||||||||||||||||||||
textColor | [opt] hexstring - color of enabled button's label. (e.g. '0xFFFFFFFF') | |||||||||||||||||||||
disabledColor | [opt] hexstring - color of disabled button's label. (e.g. '0xFFFF3300') | |||||||||||||||||||||
angle | [opt] integer - angle of control. (+ rotates CCW, - rotates CW) | |||||||||||||||||||||
shadowColor | [opt] hexstring - color of button's label's shadow. (e.g. '0xFF000000') | |||||||||||||||||||||
focusedColor | [opt] hexstring - color of focused button's label. (e.g. '0xFF00FFFF') |
Example:
String XBMCAddon::xbmcgui::ControlButton::getLabel | ( | ) |
Returns the buttons label as a unicode string.
Example:
String XBMCAddon::xbmcgui::ControlButton::getLabel2 | ( | ) |
Returns the buttons label2 as a unicode string.
Example:
void XBMCAddon::xbmcgui::ControlButton::setDisabledColor | ( | ... | ) |
Set's this buttons disabled color.
disabledColor | hexstring - color of disabled button's label. (e.g. '0xFFFF3300') |
Example:
void XBMCAddon::xbmcgui::ControlButton::setLabel | ( | ... | ) |
Set's this buttons text attributes.
label | [opt] string or unicode - text string. |
font | [opt] string - font used for label text. (e.g. 'font13') |
textColor | [opt] hexstring - color of enabled button's label. (e.g. '0xFFFFFFFF') |
disabledColor | [opt] hexstring - color of disabled button's label. (e.g. '0xFFFF3300') |
shadowColor | [opt] hexstring - color of button's label's shadow. (e.g. '0xFF000000') |
focusedColor | [opt] hexstring - color of focused button's label. (e.g. '0xFFFFFF00') |
label2 | [opt] string or unicode - text string. |
Example: