virtualx-engine/doc/classes/ColorPicker.xml

140 lines
5.5 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8" ?>
2020-02-01 02:03:48 +01:00
<class name="ColorPicker" inherits="BoxContainer" version="4.0">
<brief_description>
Color picker control.
</brief_description>
<description>
Displays a color picker widget. Useful for selecting a color from an RGB/RGBA colorspace.
</description>
<tutorials>
<link title="Tween Demo">https://godotengine.org/asset-library/asset/146</link>
</tutorials>
<methods>
<method name="add_preset">
<return type="void">
</return>
<argument index="0" name="color" type="Color">
</argument>
<description>
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.
</description>
</method>
<method name="erase_preset">
<return type="void">
</return>
<argument index="0" name="color" type="Color">
</argument>
<description>
Removes the given color from the list of color presets of this color picker.
</description>
</method>
2018-12-13 15:12:25 +01:00
<method name="get_presets" qualifiers="const">
<return type="PackedColorArray">
</return>
<description>
Returns the list of colors in the presets of the color picker.
</description>
</method>
</methods>
2018-01-11 23:38:35 +01:00
<members>
<member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" default="Color(1, 1, 1, 1)">
2018-01-11 23:38:35 +01:00
The currently selected color.
</member>
<member name="deferred_mode" type="bool" setter="set_deferred_mode" getter="is_deferred_mode" default="false">
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).
</member>
<member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true">
If [code]true[/code], shows an alpha channel slider (transparency).
2018-01-11 23:38:35 +01:00
</member>
<member name="hsv_mode" type="bool" setter="set_hsv_mode" getter="is_hsv_mode" default="false">
If [code]true[/code], allows editing the color with Hue/Saturation/Value sliders.
2019-05-03 19:38:45 +02:00
[b]Note:[/b] Cannot be enabled if raw mode is on.
</member>
2021-04-19 12:26:37 +02:00
<member name="picker_shape" type="int" setter="set_picker_shape" getter="get_picker_shape" enum="ColorPicker.PickerShapeType" default="0">
2021-02-23 11:22:46 +01:00
The shape of the color space view. See [enum PickerShapeType].
</member>
<member name="presets_enabled" type="bool" setter="set_presets_enabled" getter="are_presets_enabled" default="true">
If [code]true[/code], the "add preset" button is enabled.
2019-06-24 10:39:59 +02:00
</member>
<member name="presets_visible" type="bool" setter="set_presets_visible" getter="are_presets_visible" default="true">
If [code]true[/code], saved color presets are visible.
2019-06-24 10:39:59 +02:00
</member>
<member name="raw_mode" type="bool" setter="set_raw_mode" getter="is_raw_mode" default="false">
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).
[b]Note:[/b] Cannot be enabled if HSV mode is on.
2018-01-11 23:38:35 +01:00
</member>
</members>
<signals>
<signal name="color_changed">
<argument index="0" name="color" type="Color">
</argument>
<description>
Emitted when the color is changed.
</description>
</signal>
<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>
<constants>
2021-02-23 11:22:46 +01:00
<constant name="SHAPE_HSV_RECTANGLE" value="0" enum="PickerShapeType">
HSV Color Model rectangle color space.
</constant>
<constant name="SHAPE_HSV_WHEEL" value="1" enum="PickerShapeType">
HSV Color Model rectangle color space with a wheel.
</constant>
<constant name="SHAPE_VHS_CIRCLE" value="2" enum="PickerShapeType">
HSV Color Model circle color space. Use Saturation as a radius.
</constant>
</constants>
<theme_items>
<theme_item name="add_preset" type="Texture2D">
2020-03-03 19:21:21 +01:00
The icon for the "Add Preset" button.
</theme_item>
<theme_item name="bar_arrow" type="Texture2D">
The texture for the arrow grabber.
</theme_item>
<theme_item name="color_hue" type="Texture2D">
2020-03-03 19:21:21 +01:00
Custom texture for the hue selection slider on the right.
</theme_item>
<theme_item name="color_sample" type="Texture2D">
</theme_item>
<theme_item name="h_width" type="int" default="30">
2020-03-03 19:21:21 +01:00
The width of the hue selection slider.
</theme_item>
<theme_item name="label_width" type="int" default="10">
</theme_item>
<theme_item name="margin" type="int" default="4">
2020-03-03 19:21:21 +01:00
The margin around the [ColorPicker].
</theme_item>
<theme_item name="overbright_indicator" type="Texture2D">
2020-03-03 19:21:21 +01:00
The indicator used to signalize that the color value is outside the 0-1 range.
2019-10-01 10:55:49 +02:00
</theme_item>
2021-04-19 12:26:37 +02:00
<theme_item name="picker_cursor" type="Texture2D">
</theme_item>
<theme_item name="preset_bg" type="Texture2D">
</theme_item>
<theme_item name="screen_picker" type="Texture2D">
2020-03-03 19:21:21 +01:00
The icon for the screen color picker button.
</theme_item>
<theme_item name="sv_height" type="int" default="256">
2020-03-03 19:21:21 +01:00
The height of the saturation-value selection box.
</theme_item>
<theme_item name="sv_width" type="int" default="256">
2020-03-03 19:21:21 +01:00
The width of the saturation-value selection box.
</theme_item>
</theme_items>
</class>