3 \page Color_button_control Color button control
4 \brief **A color button control (as used for color settings).**
8 The color button control is used for creating push buttons in Kodi with a
9 box for color preview. You can choose the position, size, and look of
10 the button, as well as choosing what action(s) should be performed when pushed.
12 --------------------------------------------------------------------------------
13 \section Color_button_control_sect1 Example
16 <control type="colorbutton" id="2">
17 <description>My first colorbutton control</description>
22 <visible>true</visible>
23 <colordiffuse>FFFFFFFF</colordiffuse>
24 <texturecolormask>mycolormask.png</texturecolormask>
25 <texturecolordisabledmask>mycolormask.png</texturecolordisabledmask>
26 <colorbox>FF0533ff</colorbox>
27 <onclick>ActivateWindow(MyVideos)</onclick>
30 <textcolor>FFFFFFFF</textcolor>
31 <focusedcolor>FFFFFFFF</focusedcolor>
32 <disabledcolor>80FFFFFF</disabledcolor>
34 <aligny>center</aligny>
35 <pulseonselect>false</pulseonselect>
37 <onunfocus>-</onunfocus>
46 --------------------------------------------------------------------------------
47 \section Color_button_control_sect2 Available tags
49 In addition to the [Default Control Tags](http://kodi.wiki/view/Default_Control_Tags)
50 the following tags are available. Note that each tag is lower case only. This is
51 important, as xml tags are case-sensitive.
54 |--------------:|:--------------------------------------------------------------|
55 | texturefocus | Specifies the image file which should be displayed when the button has focus. [See here for additional information about textures](http://kodi.wiki/view/Texture_Attributes).
56 | texturenofocus| Specifies the image file which should be displayed when the button does not have focus.
57 | label | The label used on the button. It can be a link into <b>`strings.po`</b>, or an actual text label.
58 | font | Font used for the button label. From fonts.xml.
59 | textcolor | Color used for displaying the button label. In **AARRGGBB** hex format, or a name from the [colour theme](http://kodi.wiki/view/Colour_Themes).
60 | focusedcolor | Color used for the button label when the button has in focus. In **AARRGGBB** hex format or a name from the [colour theme](http://kodi.wiki/view/Colour_Themes).
61 | disabledcolor | Color used for the button label if the button is disabled. In **AARRGGBB** hex format or a name from the [colour theme](http://kodi.wiki/view/Colour_Themes).
62 | invalidcolor | Color used for the button if the user entered some invalid value. In **AARRGGBB** hex format or a name from the [colour theme](http://kodi.wiki/view/Colour_Themes).
63 | shadowcolor | Specifies the color of the drop shadow on the text, in **AARRGGBB** format, or a name from the [colour theme](http://kodi.wiki/view/Colour_Themes).
64 | angle | The angle the text should be rendered at, in degrees. A value of 0 is horizontal.
65 | align | Label horizontal alignment on the button. Defaults to left, can also be center or right.
66 | aligny | Label vertical alignment on the button. Defaults to top, can also be center.
67 | textoffsetx | Amount to offset the label from the left (or right) edge of the button when using left or right alignment.
68 | textoffsety | Amount to offset the label from the top edge of the button when using top alignment.
69 | textwidth | Will truncate any text that's too long.
70 | onclick | Specifies the action to perform when the button is pressed. Should be a built in function. [See here for more information](http://kodi.wiki/view/Built-in_functions_available_to_FTP,_Webserver,_skins,_keymap_and_to_python). You may have more than one <b>`<onclick>`</b> tag, and they'll be executed in sequence.
71 | onfocus | Specifies the action to perform when the button is focused. Should be a built in function. The action is performed after any focus animations have completed. [See here for more information](http://kodi.wiki/view/Built-in_functions_available_to_FTP,_Webserver,_skins,_keymap_and_to_python).
72 | onunfocus | Specifies the action to perform when the button loses focus. Should be a built in function.
73 | wrapmultiline | Will wrap the label across multiple lines if the label exceeds the control width.
74 | colorbox | Specifies the color of the preview color box, in **AARRGGBB** format, or a name from the [colour theme](http://kodi.wiki/view/Colour_Themes).
75 | colorposx | X offset of the preview color box
76 | colorposy | Y offset of the preview color box
77 | colorwidth | Width in Pixels of the preview color box
78 | colorheight | Height in Pixels of the preview color box
79 | texturecolormask | Specifies the image mask which should be displayed to see the color preview. [See here for additional information about textures](http://kodi.wiki/view/Texture_Attributes).
80 | texturecolordisabledmask | Specifies the image mask which should be displayed when the control is disabled. [See here for additional information about textures](http://kodi.wiki/view/Texture_Attributes).
83 --------------------------------------------------------------------------------
84 \section Color_button_control_sect3 See also
87 - [Add-on development](http://kodi.wiki/view/Add-on_development)
88 - [Skinning](http://kodi.wiki/view/Skinning)