class_colorpickerbutton.rst 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the ColorPickerButton.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_ColorPickerButton:
  5. ColorPickerButton
  6. =================
  7. **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>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Button that pops out a :ref:`ColorPicker<class_ColorPicker>`.
  12. Properties
  13. ----------
  14. +---------------------------+----------------------------------------------------------------+
  15. | :ref:`Color<class_Color>` | :ref:`color<class_ColorPickerButton_property_color>` |
  16. +---------------------------+----------------------------------------------------------------+
  17. | :ref:`bool<class_bool>` | :ref:`edit_alpha<class_ColorPickerButton_property_edit_alpha>` |
  18. +---------------------------+----------------------------------------------------------------+
  19. Methods
  20. -------
  21. +---------------------------------------+--------------------------------------------------------------------------+
  22. | :ref:`ColorPicker<class_ColorPicker>` | :ref:`get_picker<class_ColorPickerButton_method_get_picker>` **(** **)** |
  23. +---------------------------------------+--------------------------------------------------------------------------+
  24. | :ref:`PopupPanel<class_PopupPanel>` | :ref:`get_popup<class_ColorPickerButton_method_get_popup>` **(** **)** |
  25. +---------------------------------------+--------------------------------------------------------------------------+
  26. Theme Properties
  27. ----------------
  28. +---------------------------------+---------------------+
  29. | :ref:`Texture<class_Texture>` | bg |
  30. +---------------------------------+---------------------+
  31. | :ref:`StyleBox<class_StyleBox>` | disabled |
  32. +---------------------------------+---------------------+
  33. | :ref:`StyleBox<class_StyleBox>` | focus |
  34. +---------------------------------+---------------------+
  35. | :ref:`Font<class_Font>` | font |
  36. +---------------------------------+---------------------+
  37. | :ref:`Color<class_Color>` | font_color |
  38. +---------------------------------+---------------------+
  39. | :ref:`Color<class_Color>` | font_color_disabled |
  40. +---------------------------------+---------------------+
  41. | :ref:`Color<class_Color>` | font_color_hover |
  42. +---------------------------------+---------------------+
  43. | :ref:`Color<class_Color>` | font_color_pressed |
  44. +---------------------------------+---------------------+
  45. | :ref:`StyleBox<class_StyleBox>` | hover |
  46. +---------------------------------+---------------------+
  47. | :ref:`int<class_int>` | hseparation |
  48. +---------------------------------+---------------------+
  49. | :ref:`StyleBox<class_StyleBox>` | normal |
  50. +---------------------------------+---------------------+
  51. | :ref:`StyleBox<class_StyleBox>` | pressed |
  52. +---------------------------------+---------------------+
  53. Signals
  54. -------
  55. .. _class_ColorPickerButton_signal_color_changed:
  56. - **color_changed** **(** :ref:`Color<class_Color>` color **)**
  57. Emitted when the color changes.
  58. .. _class_ColorPickerButton_signal_popup_closed:
  59. - **popup_closed** **(** **)**
  60. Description
  61. -----------
  62. Encapsulates a :ref:`ColorPicker<class_ColorPicker>` making it accessible by pressing a button. Pressing the button will toggle the :ref:`ColorPicker<class_ColorPicker>` visibility.
  63. Property Descriptions
  64. ---------------------
  65. .. _class_ColorPickerButton_property_color:
  66. - :ref:`Color<class_Color>` **color**
  67. +----------+-----------------------+
  68. | *Setter* | set_pick_color(value) |
  69. +----------+-----------------------+
  70. | *Getter* | get_pick_color() |
  71. +----------+-----------------------+
  72. The currently selected color.
  73. .. _class_ColorPickerButton_property_edit_alpha:
  74. - :ref:`bool<class_bool>` **edit_alpha**
  75. +----------+-----------------------+
  76. | *Setter* | set_edit_alpha(value) |
  77. +----------+-----------------------+
  78. | *Getter* | is_editing_alpha() |
  79. +----------+-----------------------+
  80. If ``true``, the alpha channel in the displayed :ref:`ColorPicker<class_ColorPicker>` will be visible. Default value: ``true``.
  81. Method Descriptions
  82. -------------------
  83. .. _class_ColorPickerButton_method_get_picker:
  84. - :ref:`ColorPicker<class_ColorPicker>` **get_picker** **(** **)**
  85. Returns the :ref:`ColorPicker<class_ColorPicker>` that this node toggles.
  86. .. _class_ColorPickerButton_method_get_popup:
  87. - :ref:`PopupPanel<class_PopupPanel>` **get_popup** **(** **)**
  88. Returns the control's :ref:`PopupPanel<class_PopupPanel>` which allows you to connect to popup signals. This allows you to handle events when the ColorPicker is shown or hidden.