class_colorpickerbutton.rst 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. | :ref:`bool<class_bool>` | toggle_mode | **O:** true |
  21. +---------------------------+----------------------------------------------------------------+---------------------+
  22. Methods
  23. -------
  24. +---------------------------------------+--------------------------------------------------------------------------+
  25. | :ref:`ColorPicker<class_ColorPicker>` | :ref:`get_picker<class_ColorPickerButton_method_get_picker>` **(** **)** |
  26. +---------------------------------------+--------------------------------------------------------------------------+
  27. | :ref:`PopupPanel<class_PopupPanel>` | :ref:`get_popup<class_ColorPickerButton_method_get_popup>` **(** **)** |
  28. +---------------------------------------+--------------------------------------------------------------------------+
  29. Theme Properties
  30. ----------------
  31. +---------------------------------+---------------------+-----------------------------+
  32. | :ref:`Texture<class_Texture>` | bg | |
  33. +---------------------------------+---------------------+-----------------------------+
  34. | :ref:`StyleBox<class_StyleBox>` | disabled | |
  35. +---------------------------------+---------------------+-----------------------------+
  36. | :ref:`StyleBox<class_StyleBox>` | focus | |
  37. +---------------------------------+---------------------+-----------------------------+
  38. | :ref:`Font<class_Font>` | font | |
  39. +---------------------------------+---------------------+-----------------------------+
  40. | :ref:`Color<class_Color>` | font_color | Color( 1, 1, 1, 1 ) |
  41. +---------------------------------+---------------------+-----------------------------+
  42. | :ref:`Color<class_Color>` | font_color_disabled | Color( 0.9, 0.9, 0.9, 0.3 ) |
  43. +---------------------------------+---------------------+-----------------------------+
  44. | :ref:`Color<class_Color>` | font_color_hover | Color( 1, 1, 1, 1 ) |
  45. +---------------------------------+---------------------+-----------------------------+
  46. | :ref:`Color<class_Color>` | font_color_pressed | Color( 0.8, 0.8, 0.8, 1 ) |
  47. +---------------------------------+---------------------+-----------------------------+
  48. | :ref:`StyleBox<class_StyleBox>` | hover | |
  49. +---------------------------------+---------------------+-----------------------------+
  50. | :ref:`int<class_int>` | hseparation | 2 |
  51. +---------------------------------+---------------------+-----------------------------+
  52. | :ref:`StyleBox<class_StyleBox>` | normal | |
  53. +---------------------------------+---------------------+-----------------------------+
  54. | :ref:`StyleBox<class_StyleBox>` | pressed | |
  55. +---------------------------------+---------------------+-----------------------------+
  56. Signals
  57. -------
  58. .. _class_ColorPickerButton_signal_color_changed:
  59. - **color_changed** **(** :ref:`Color<class_Color>` color **)**
  60. Emitted when the color changes.
  61. ----
  62. .. _class_ColorPickerButton_signal_picker_created:
  63. - **picker_created** **(** **)**
  64. ----
  65. .. _class_ColorPickerButton_signal_popup_closed:
  66. - **popup_closed** **(** **)**
  67. Description
  68. -----------
  69. Encapsulates a :ref:`ColorPicker<class_ColorPicker>` making it accessible by pressing a button. Pressing the button will toggle the :ref:`ColorPicker<class_ColorPicker>` visibility.
  70. Property Descriptions
  71. ---------------------
  72. .. _class_ColorPickerButton_property_color:
  73. - :ref:`Color<class_Color>` **color**
  74. +-----------+-----------------------+
  75. | *Default* | Color( 0, 0, 0, 1 ) |
  76. +-----------+-----------------------+
  77. | *Setter* | set_pick_color(value) |
  78. +-----------+-----------------------+
  79. | *Getter* | get_pick_color() |
  80. +-----------+-----------------------+
  81. The currently selected color.
  82. ----
  83. .. _class_ColorPickerButton_property_edit_alpha:
  84. - :ref:`bool<class_bool>` **edit_alpha**
  85. +-----------+-----------------------+
  86. | *Default* | true |
  87. +-----------+-----------------------+
  88. | *Setter* | set_edit_alpha(value) |
  89. +-----------+-----------------------+
  90. | *Getter* | is_editing_alpha() |
  91. +-----------+-----------------------+
  92. If ``true``, the alpha channel in the displayed :ref:`ColorPicker<class_ColorPicker>` will be visible.
  93. Method Descriptions
  94. -------------------
  95. .. _class_ColorPickerButton_method_get_picker:
  96. - :ref:`ColorPicker<class_ColorPicker>` **get_picker** **(** **)**
  97. Returns the :ref:`ColorPicker<class_ColorPicker>` that this node toggles.
  98. ----
  99. .. _class_ColorPickerButton_method_get_popup:
  100. - :ref:`PopupPanel<class_PopupPanel>` **get_popup** **(** **)**
  101. 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.