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:
setLabel | ( | ... | ) |
Function: setLabel([label, font, textColor, disabledColor, shadowColor, focusedColor, label2])
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:
setDisabledColor | ( | ... | ) |
Function: setDisabledColor(disabledColor)
disabledColor | hexstring - color of disabled button's label. (e.g. '0xFFFF3300') |
Example:
getLabel | ( | ) |
Function: getLabel()
Example:
getLabel2 | ( | ) |
Function: getLabel2()
Example: