class_colorpickerbutton.rst 4.9 KB

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