2017-09-13 04:42:36 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
2019-04-01 18:33:56 +08:00
<class name= "ColorPicker" inherits= "BoxContainer" category= "Core" version= "3.2" >
2017-09-13 04:42:36 +08:00
<brief_description >
Color picker control.
</brief_description>
<description >
2018-08-18 05:55:19 +08:00
[Control] node displaying a color picker widget. It's useful for selecting a color from an RGB/RGBA colorspace.
2017-09-13 04:42:36 +08:00
</description>
<tutorials >
</tutorials>
<methods >
<method name= "add_preset" >
<return type= "void" >
</return>
<argument index= "0" name= "color" type= "Color" >
</argument>
<description >
2019-06-22 07:04:47 +08:00
Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them.
[b]Note:[/b] the presets list is only for [i]this[/i] color picker.
2017-09-13 04:42:36 +08:00
</description>
</method>
2018-10-03 22:12:38 +08:00
<method name= "erase_preset" >
<return type= "void" >
</return>
<argument index= "0" name= "color" type= "Color" >
</argument>
<description >
2019-06-22 07:04:47 +08:00
Removes the given color from the list of color presets of this color picker.
2018-10-03 22:12:38 +08:00
</description>
</method>
2018-12-13 22:12:25 +08:00
<method name= "get_presets" qualifiers= "const" >
2018-10-03 22:12:38 +08:00
<return type= "PoolColorArray" >
</return>
<description >
2019-05-24 10:15:43 +08:00
Returns the list of colors in the presets of the color picker.
2018-10-03 22:12:38 +08:00
</description>
</method>
2017-09-13 04:42:36 +08:00
</methods>
2018-01-12 06:38:35 +08:00
<members >
2019-06-29 18:38:01 +08:00
<member name= "color" type= "Color" setter= "set_pick_color" getter= "get_pick_color" default= "Color( 1, 1, 1, 1 )" >
2018-01-12 06:38:35 +08:00
The currently selected color.
</member>
2019-06-29 18:38:01 +08:00
<member name= "deferred_mode" type= "bool" setter= "set_deferred_mode" getter= "is_deferred_mode" default= "false" >
2018-12-20 20:46:54 +08:00
If [code]true[/code], the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues).
2018-07-26 17:56:21 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "edit_alpha" type= "bool" setter= "set_edit_alpha" getter= "is_editing_alpha" default= "true" >
2018-12-20 20:46:54 +08:00
If [code]true[/code], shows an alpha channel slider (transparency).
2018-01-12 06:38:35 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "hsv_mode" type= "bool" setter= "set_hsv_mode" getter= "is_hsv_mode" default= "false" >
2019-06-22 07:04:47 +08:00
If [code]true[/code], allows editing the color with Hue/Saturation/Value sliders.
2019-05-04 01:38:45 +08:00
[b]Note:[/b] Cannot be enabled if raw mode is on.
</member>
2019-06-29 18:38:01 +08:00
<member name= "presets_enabled" type= "bool" setter= "set_presets_enabled" getter= "are_presets_enabled" default= "true" >
2019-10-07 07:26:15 +08:00
If [code]true[/code], the "add preset" button is enabled.
2019-06-24 16:39:59 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "presets_visible" type= "bool" setter= "set_presets_visible" getter= "are_presets_visible" default= "true" >
2019-10-07 07:26:15 +08:00
If [code]true[/code], saved color presets are visible.
2019-06-24 16:39:59 +08:00
</member>
2019-06-29 18:38:01 +08:00
<member name= "raw_mode" type= "bool" setter= "set_raw_mode" getter= "is_raw_mode" default= "false" >
2018-12-20 20:46:54 +08:00
If [code]true[/code], allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR).
2019-06-22 07:04:47 +08:00
[b]Note:[/b] Cannot be enabled if HSV mode is on.
2018-01-12 06:38:35 +08:00
</member>
</members>
2017-09-13 04:42:36 +08:00
<signals >
<signal name= "color_changed" >
<argument index= "0" name= "color" type= "Color" >
</argument>
<description >
Emitted when the color is changed.
</description>
</signal>
2018-10-03 22:12:38 +08:00
<signal name= "preset_added" >
<argument index= "0" name= "color" type= "Color" >
</argument>
<description >
Emitted when a preset is added.
</description>
</signal>
<signal name= "preset_removed" >
<argument index= "0" name= "color" type= "Color" >
</argument>
<description >
Emitted when a preset is removed.
</description>
</signal>
</signals>
2017-09-13 04:42:36 +08:00
<constants >
</constants>
<theme_items >
<theme_item name= "add_preset" type= "Texture" >
</theme_item>
<theme_item name= "color_hue" type= "Texture" >
</theme_item>
<theme_item name= "color_sample" type= "Texture" >
</theme_item>
2019-06-29 18:38:01 +08:00
<theme_item name= "h_width" type= "int" default= "30" >
2017-09-13 04:42:36 +08:00
</theme_item>
2019-06-29 18:38:01 +08:00
<theme_item name= "label_width" type= "int" default= "10" >
2017-09-13 04:42:36 +08:00
</theme_item>
2019-06-29 18:38:01 +08:00
<theme_item name= "margin" type= "int" default= "4" >
2017-09-13 04:42:36 +08:00
</theme_item>
2019-10-01 16:55:49 +08:00
<theme_item name= "overbright_indicator" type= "Texture" >
</theme_item>
2017-10-12 05:54:43 +08:00
<theme_item name= "preset_bg" type= "Texture" >
</theme_item>
2017-09-13 04:42:36 +08:00
<theme_item name= "screen_picker" type= "Texture" >
</theme_item>
2019-06-29 18:38:01 +08:00
<theme_item name= "sv_height" type= "int" default= "256" >
2017-09-13 04:42:36 +08:00
</theme_item>
2019-06-29 18:38:01 +08:00
<theme_item name= "sv_width" type= "int" default= "256" >
2017-09-13 04:42:36 +08:00
</theme_item>
</theme_items>
</class>