class_colorpicker.rst 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the ColorPicker.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_ColorPicker:
  5. ColorPicker
  6. ===========
  7. **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>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Color picker control.
  12. Member Functions
  13. ----------------
  14. +-------+---------------------------------------------------------------------------------------------+
  15. | void | :ref:`add_preset<class_ColorPicker_add_preset>` **(** :ref:`Color<class_color>` color **)** |
  16. +-------+---------------------------------------------------------------------------------------------+
  17. Signals
  18. -------
  19. .. _class_ColorPicker_color_changed:
  20. - **color_changed** **(** :ref:`Color<class_color>` color **)**
  21. Emitted when the color is changed.
  22. Member Variables
  23. ----------------
  24. .. _class_ColorPicker_color:
  25. - :ref:`Color<class_color>` **color** - The currently selected color.
  26. .. _class_ColorPicker_edit_alpha:
  27. - :ref:`bool<class_bool>` **edit_alpha** - If ``true``, shows an alpha channel slider (transparency).
  28. .. _class_ColorPicker_raw_mode:
  29. - :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).
  30. Description
  31. -----------
  32. This is a simple color picker :ref:`Control<class_control>`. It's useful for selecting a color from an RGB/RGBA colorspace.
  33. Member Function Description
  34. ---------------------------
  35. .. _class_ColorPicker_add_preset:
  36. - void **add_preset** **(** :ref:`Color<class_color>` color **)**
  37. Adds the current selected to color to a list of colors (presets), the presets will be displayed in the color picker and the user will be able to select them, notice that the presets list is only for this color picker.