ColorPickerButton.xml 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ColorPickerButton" inherits="Button" version="3.4">
  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. <description>
  18. Returns the [ColorPicker] that this node toggles.
  19. </description>
  20. </method>
  21. <method name="get_popup">
  22. <return type="PopupPanel" />
  23. <description>
  24. 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.
  25. </description>
  26. </method>
  27. </methods>
  28. <members>
  29. <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" default="Color( 0, 0, 0, 1 )">
  30. The currently selected color.
  31. </member>
  32. <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true">
  33. If [code]true[/code], the alpha channel in the displayed [ColorPicker] will be visible.
  34. </member>
  35. <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
  36. </members>
  37. <signals>
  38. <signal name="color_changed">
  39. <argument index="0" name="color" type="Color" />
  40. <description>
  41. Emitted when the color changes.
  42. </description>
  43. </signal>
  44. <signal name="picker_created">
  45. <description>
  46. Emitted when the [ColorPicker] is created (the button is pressed for the first time).
  47. </description>
  48. </signal>
  49. <signal name="popup_closed">
  50. <description>
  51. Emitted when the [ColorPicker] is closed.
  52. </description>
  53. </signal>
  54. </signals>
  55. <constants>
  56. </constants>
  57. <theme_items>
  58. <theme_item name="bg" data_type="icon" type="Texture">
  59. The background of the color preview rect on the button.
  60. </theme_item>
  61. <theme_item name="disabled" data_type="style" type="StyleBox">
  62. [StyleBox] used when the [ColorPickerButton] is disabled.
  63. </theme_item>
  64. <theme_item name="focus" data_type="style" type="StyleBox">
  65. [StyleBox] used when the [ColorPickerButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
  66. </theme_item>
  67. <theme_item name="font" data_type="font" type="Font">
  68. [Font] of the [ColorPickerButton]'s text.
  69. </theme_item>
  70. <theme_item name="font_color" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
  71. Default text [Color] of the [ColorPickerButton].
  72. </theme_item>
  73. <theme_item name="font_color_disabled" data_type="color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.3 )">
  74. Text [Color] used when the [ColorPickerButton] is disabled.
  75. </theme_item>
  76. <theme_item name="font_color_hover" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
  77. Text [Color] used when the [ColorPickerButton] is being hovered.
  78. </theme_item>
  79. <theme_item name="font_color_pressed" data_type="color" type="Color" default="Color( 0.8, 0.8, 0.8, 1 )">
  80. Text [Color] used when the [ColorPickerButton] is being pressed.
  81. </theme_item>
  82. <theme_item name="hover" data_type="style" type="StyleBox">
  83. [StyleBox] used when the [ColorPickerButton] is being hovered.
  84. </theme_item>
  85. <theme_item name="hseparation" data_type="constant" type="int" default="2">
  86. The horizontal space between [ColorPickerButton]'s icon and text.
  87. </theme_item>
  88. <theme_item name="normal" data_type="style" type="StyleBox">
  89. Default [StyleBox] for the [ColorPickerButton].
  90. </theme_item>
  91. <theme_item name="pressed" data_type="style" type="StyleBox">
  92. [StyleBox] used when the [ColorPickerButton] is being pressed.
  93. </theme_item>
  94. </theme_items>
  95. </class>