ColorPickerButton.xml 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ColorPickerButton" inherits="Button" version="3.3">
  3. <brief_description>
  4. Button that pops out a [ColorPicker].
  5. </brief_description>
  6. <description>
  7. Encapsulates a [ColorPicker] making it accessible by pressing a button. Pressing the button will toggle the [ColorPicker] visibility.
  8. See also [BaseButton] which contains common properties and methods associated with this node.
  9. </description>
  10. <tutorials>
  11. <link title="GUI Drag And Drop Demo">https://godotengine.org/asset-library/asset/133</link>
  12. <link title="2D GD Paint Demo">https://godotengine.org/asset-library/asset/517</link>
  13. </tutorials>
  14. <methods>
  15. <method name="get_picker">
  16. <return type="ColorPicker">
  17. </return>
  18. <description>
  19. Returns the [ColorPicker] that this node toggles.
  20. </description>
  21. </method>
  22. <method name="get_popup">
  23. <return type="PopupPanel">
  24. </return>
  25. <description>
  26. Returns the control's [PopupPanel] which allows you to connect to popup signals. This allows you to handle events when the ColorPicker is shown or hidden.
  27. </description>
  28. </method>
  29. </methods>
  30. <members>
  31. <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" default="Color( 0, 0, 0, 1 )">
  32. The currently selected color.
  33. </member>
  34. <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true">
  35. If [code]true[/code], the alpha channel in the displayed [ColorPicker] will be visible.
  36. </member>
  37. <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
  38. </members>
  39. <signals>
  40. <signal name="color_changed">
  41. <argument index="0" name="color" type="Color">
  42. </argument>
  43. <description>
  44. Emitted when the color changes.
  45. </description>
  46. </signal>
  47. <signal name="picker_created">
  48. <description>
  49. Emitted when the [ColorPicker] is created (the button is pressed for the first time).
  50. </description>
  51. </signal>
  52. <signal name="popup_closed">
  53. <description>
  54. Emitted when the [ColorPicker] is closed.
  55. </description>
  56. </signal>
  57. </signals>
  58. <constants>
  59. </constants>
  60. <theme_items>
  61. <theme_item name="bg" type="Texture">
  62. The background of the color preview rect on the button.
  63. </theme_item>
  64. <theme_item name="disabled" type="StyleBox">
  65. [StyleBox] used when the [ColorPickerButton] is disabled.
  66. </theme_item>
  67. <theme_item name="focus" type="StyleBox">
  68. [StyleBox] used when the [ColorPickerButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
  69. </theme_item>
  70. <theme_item name="font" type="Font">
  71. [Font] of the [ColorPickerButton]'s text.
  72. </theme_item>
  73. <theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )">
  74. Default text [Color] of the [ColorPickerButton].
  75. </theme_item>
  76. <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.3 )">
  77. Text [Color] used when the [ColorPickerButton] is disabled.
  78. </theme_item>
  79. <theme_item name="font_color_hover" type="Color" default="Color( 1, 1, 1, 1 )">
  80. Text [Color] used when the [ColorPickerButton] is being hovered.
  81. </theme_item>
  82. <theme_item name="font_color_pressed" type="Color" default="Color( 0.8, 0.8, 0.8, 1 )">
  83. Text [Color] used when the [ColorPickerButton] is being pressed.
  84. </theme_item>
  85. <theme_item name="hover" type="StyleBox">
  86. [StyleBox] used when the [ColorPickerButton] is being hovered.
  87. </theme_item>
  88. <theme_item name="hseparation" type="int" default="2">
  89. The horizontal space between [ColorPickerButton]'s icon and text.
  90. </theme_item>
  91. <theme_item name="normal" type="StyleBox">
  92. Default [StyleBox] for the [ColorPickerButton].
  93. </theme_item>
  94. <theme_item name="pressed" type="StyleBox">
  95. [StyleBox] used when the [ColorPickerButton] is being pressed.
  96. </theme_item>
  97. </theme_items>
  98. </class>