mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
89 lines
3.6 KiB
ReStructuredText
89 lines
3.6 KiB
ReStructuredText
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the ColorPickerButton.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_ColorPickerButton:
|
|
|
|
ColorPickerButton
|
|
=================
|
|
|
|
**Inherits:** :ref:`Button<class_button>` **<** :ref:`BaseButton<class_basebutton>` **<** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
|
|
|
|
**Category:** Core
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
Button that pops out a :ref:`ColorPicker<class_colorpicker>`
|
|
|
|
Member Functions
|
|
----------------
|
|
|
|
+----------------------------------------+-------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Color<class_color>` | :ref:`get_pick_color<class_ColorPickerButton_get_pick_color>` **(** **)** const |
|
|
+----------------------------------------+-------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`ColorPicker<class_colorpicker>` | :ref:`get_picker<class_ColorPickerButton_get_picker>` **(** **)** |
|
|
+----------------------------------------+-------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_editing_alpha<class_ColorPickerButton_is_editing_alpha>` **(** **)** const |
|
|
+----------------------------------------+-------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_edit_alpha<class_ColorPickerButton_set_edit_alpha>` **(** :ref:`bool<class_bool>` show **)** |
|
|
+----------------------------------------+-------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_pick_color<class_ColorPickerButton_set_pick_color>` **(** :ref:`Color<class_color>` color **)** |
|
|
+----------------------------------------+-------------------------------------------------------------------------------------------------------------+
|
|
|
|
Signals
|
|
-------
|
|
|
|
- **color_changed** **(** :ref:`Color<class_color>` color **)**
|
|
Emitted when the color is changed.
|
|
|
|
|
|
Member Variables
|
|
----------------
|
|
|
|
- :ref:`Color<class_color>` **color**
|
|
- :ref:`bool<class_bool>` **edit_alpha**
|
|
|
|
Description
|
|
-----------
|
|
|
|
Encapsulates a :ref:`ColorPicker<class_colorpicker>` making it accesible by pressing a button, pressing the button will toggle the :ref:`ColorPicker<class_colorpicker>` visibility
|
|
|
|
Member Function Description
|
|
---------------------------
|
|
|
|
.. _class_ColorPickerButton_get_pick_color:
|
|
|
|
- :ref:`Color<class_color>` **get_pick_color** **(** **)** const
|
|
|
|
.. _class_ColorPickerButton_get_picker:
|
|
|
|
- :ref:`ColorPicker<class_colorpicker>` **get_picker** **(** **)**
|
|
|
|
.. _class_ColorPickerButton_is_editing_alpha:
|
|
|
|
- :ref:`bool<class_bool>` **is_editing_alpha** **(** **)** const
|
|
|
|
See :ref:`ColorPicker.is_edit_alpha<class_ColorPicker_is_edit_alpha>`
|
|
|
|
.. _class_ColorPickerButton_set_edit_alpha:
|
|
|
|
- void **set_edit_alpha** **(** :ref:`bool<class_bool>` show **)**
|
|
|
|
See :ref:`ColorPicker.set_edit_alpha<class_ColorPicker_set_edit_alpha>`
|
|
|
|
.. _class_ColorPickerButton_set_pick_color:
|
|
|
|
- void **set_pick_color** **(** :ref:`Color<class_color>` color **)**
|
|
|
|
Set new color to ColorRect.
|
|
|
|
|
|
|
|
::
|
|
|
|
var cr = get_node("colorrect_node")
|
|
cr.set_frame_color(Color(1, 0, 0, 1)) # Set color rect node to red
|
|
|
|
|