Code based skin access.
Offers classes and functions that manipulate the add-on gui controls.
Class: Control()
Code based skin access.
Kodi is noted as having a very flexible and robust framework for its GUI, making theme-skinning and personal customization very accessible. Users can create their own skin (or modify an existing skin) and share it with others.
Kodi includes a new GUI library written from scratch. This library allows you to skin/change everything you see in Kodi, from the images, the sizes and positions of all controls, colours, fonts, and text, through to altering navigation and even adding new functionality. The skin system is quite complex, and this portion of the manual is dedicated to providing in depth information on how it all works, along with tips to make the experience a little more pleasant.
Modules | |
Subclass - ControlSpin | |
Used for cycling up/down controls. | |
Subclass - ControlLabel | |
Used to show some lines of text. | |
Subclass - ControlEdit | |
Subclass - ControlList | |
Used for a scrolling lists of items. Replaces the list control. | |
Subclass - ControlFadeLabel | |
Used to show multiple pieces of text in the same position, by fading from one to the other. | |
Subclass - ControlTextBox | |
Used to show a multi-page piece of text. | |
Subclass - ControlImage | |
Used to show an image. | |
Subclass - ControlProgress | |
Used to show the progress of a particular operation. | |
Subclass - ControlButton | |
A standard push button control. | |
Subclass - ControlGroup | |
Used to group controls together.. | |
Subclass - ControlRadioButton | |
A radio button control (as used for on/off settings). | |
Subclass - ControlSlider | |
Used for a volume slider. | |
getId | ( | ) |
Function: getId()
Example:
getX | ( | ) |
Function: getX()
Example:
getY | ( | ) |
Function: getY()
Example:
getHeight | ( | ) |
Function: getHeight()
Example:
getWidth | ( | ) |
Function: getWidth()
Example:
setEnabled | ( | ... | ) |
Function: setEnabled(enabled)
enabled | bool - True=enabled / False=disabled. |
Example:
setVisible | ( | ... | ) |
Function: setVisible(visible)
visible | bool - True=visible / False=hidden. |
Example:
isVisible | ( | ... | ) |
Function: isVisible()
False
(the control is not visible yet since it was not added to the window).Example:
setVisibleCondition | ( | ... | ) |
Function: setVisibleCondition(visible[,allowHiddenFocus])
Allows Kodi to control the visible status of the control.
visible | string - Visible condition |
allowHiddenFocus | [opt] bool - True=gains focus even if hidden |
Example:
setEnableCondition | ( | ... | ) |
Function: setEnableCondition(enable)
Allows Kodi to control the enabled status of the control.
enable | string - Enable condition. |
Example:
setAnimations | ( | ... | ) |
Function: setAnimations([(event, attr,)*])
[(event,attr,)*]: list - A list of tuples consisting of event and attributes pairs.
event | string - The event to animate. |
attr | string - The whole attribute string separated by spaces. |
Example:
setPosition | ( | ... | ) |
Function: setPosition(x, y)
x | integer - x coordinate of control. |
y | integer - y coordinate of control. |
Example:
setWidth | ( | ... | ) |
Function: setWidth(width)
width | integer - width of control. |
Example:
setHeight | ( | ... | ) |
Function: setHeight(height)
height | integer - height of control. |
Example:
setNavigation | ( | ... | ) |
Function: setNavigation(up, down, left, right)
up | control object - control to navigate to on up. |
down | control object - control to navigate to on down. |
left | control object - control to navigate to on left. |
right | control object - control to navigate to on right. |
TypeError | if one of the supplied arguments is not a control type. |
ReferenceError | if one of the controls is not added to a window. |
Example:
controlUp | ( | ... | ) |
Function: controlUp(control)
control | control object - control to navigate to on up. |
TypeError | if one of the supplied arguments is not a control type. |
ReferenceError | if one of the controls is not added to a window. |
Example:
controlDown | ( | ... | ) |
Function: controlDown(control)
control | control object - control to navigate to on down. |
TypeError | if one of the supplied arguments is not a control type. |
ReferenceError | if one of the controls is not added to a window. |
Example:
controlLeft | ( | ... | ) |
Function: controlLeft(control)
control | control object - control to navigate to on left. |
TypeError | if one of the supplied arguments is not a control type. |
ReferenceError | if one of the controls is not added to a window. |
Example:
controlRight | ( | ... | ) |
Function: controlRight(control)
control | control object - control to navigate to on right. |
TypeError | if one of the supplied arguments is not a control type. |
ReferenceError | if one of the controls is not added to a window. |
Example: