class_colorpickerbutton.rst 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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>` | Color( 0, 0, 0, 1 ) |
  17. +---------------------------+----------------------------------------------------------------+---------------------+
  18. | :ref:`bool<class_bool>` | :ref:`edit_alpha<class_ColorPickerButton_property_edit_alpha>` | true |
  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 | Color( 1, 1, 1, 1 ) |
  39. +---------------------------------+---------------------+-----------------------------+
  40. | :ref:`Color<class_Color>` | font_color_disabled | Color( 0.9, 0.9, 0.9, 0.3 ) |
  41. +---------------------------------+---------------------+-----------------------------+
  42. | :ref:`Color<class_Color>` | font_color_hover | Color( 1, 1, 1, 1 ) |
  43. +---------------------------------+---------------------+-----------------------------+
  44. | :ref:`Color<class_Color>` | font_color_pressed | Color( 0.8, 0.8, 0.8, 1 ) |
  45. +---------------------------------+---------------------+-----------------------------+
  46. | :ref:`StyleBox<class_StyleBox>` | hover | |
  47. +---------------------------------+---------------------+-----------------------------+
  48. | :ref:`int<class_int>` | hseparation | 2 |
  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. .. _class_ColorPickerButton_signal_popup_closed:
  60. - **popup_closed** **(** **)**
  61. Description
  62. -----------
  63. Encapsulates a :ref:`ColorPicker<class_ColorPicker>` making it accessible by pressing a button. Pressing the button will toggle the :ref:`ColorPicker<class_ColorPicker>` visibility.
  64. Property Descriptions
  65. ---------------------
  66. .. _class_ColorPickerButton_property_color:
  67. - :ref:`Color<class_Color>` **color**
  68. +-----------+-----------------------+
  69. | *Default* | Color( 0, 0, 0, 1 ) |
  70. +-----------+-----------------------+
  71. | *Setter* | set_pick_color(value) |
  72. +-----------+-----------------------+
  73. | *Getter* | get_pick_color() |
  74. +-----------+-----------------------+
  75. The currently selected color.
  76. .. _class_ColorPickerButton_property_edit_alpha:
  77. - :ref:`bool<class_bool>` **edit_alpha**
  78. +-----------+-----------------------+
  79. | *Default* | true |
  80. +-----------+-----------------------+
  81. | *Setter* | set_edit_alpha(value) |
  82. +-----------+-----------------------+
  83. | *Getter* | is_editing_alpha() |
  84. +-----------+-----------------------+
  85. If ``true``, the alpha channel in the displayed :ref:`ColorPicker<class_ColorPicker>` will be visible.
  86. Method Descriptions
  87. -------------------
  88. .. _class_ColorPickerButton_method_get_picker:
  89. - :ref:`ColorPicker<class_ColorPicker>` **get_picker** **(** **)**
  90. Returns the :ref:`ColorPicker<class_ColorPicker>` that this node toggles.
  91. .. _class_ColorPickerButton_method_get_popup:
  92. - :ref:`PopupPanel<class_PopupPanel>` **get_popup** **(** **)**
  93. 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.