Files
godot-docs/classes/class_colorpicker.rst
2018-08-21 00:37:52 +02:00

71 lines
2.4 KiB
ReStructuredText

.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the ColorPicker.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_ColorPicker:
ColorPicker
===========
**Inherits:** :ref:`BoxContainer<class_boxcontainer>` **<** :ref:`Container<class_container>` **<** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
**Category:** Core
Brief Description
-----------------
Color picker control.
Member Functions
----------------
+-------+---------------------------------------------------------------------------------------------+
| void | :ref:`add_preset<class_ColorPicker_add_preset>` **(** :ref:`Color<class_color>` color **)** |
+-------+---------------------------------------------------------------------------------------------+
Signals
-------
.. _class_ColorPicker_color_changed:
- **color_changed** **(** :ref:`Color<class_color>` color **)**
Emitted when the color is changed.
Member Variables
----------------
.. _class_ColorPicker_color:
- :ref:`Color<class_color>` **color** - The currently selected color.
.. _class_ColorPicker_deferred_mode:
- :ref:`bool<class_bool>` **deferred_mode** - If ``true`` the color will apply only after the user releases the mouse button, otherwise it will apply immediatly even in mouse motion event (which can cause performance issues).
.. _class_ColorPicker_edit_alpha:
- :ref:`bool<class_bool>` **edit_alpha** - If ``true`` shows an alpha channel slider (transparency).
.. _class_ColorPicker_raw_mode:
- :ref:`bool<class_bool>` **raw_mode** - If ``true`` 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).
Description
-----------
:ref:`Control<class_control>` node displaying a color picker widget. It's useful for selecting a color from an RGB/RGBA colorspace.
Member Function Description
---------------------------
.. _class_ColorPicker_add_preset:
- void **add_preset** **(** :ref:`Color<class_color>` color **)**
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. Note: the presets list is only for *this* color picker.