ColorPickerButton.xml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ColorPickerButton" inherits="Button" version="3.2">
  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. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="get_picker">
  13. <return type="ColorPicker">
  14. </return>
  15. <description>
  16. Returns the [ColorPicker] that this node toggles.
  17. </description>
  18. </method>
  19. <method name="get_popup">
  20. <return type="PopupPanel">
  21. </return>
  22. <description>
  23. 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.
  24. </description>
  25. </method>
  26. </methods>
  27. <members>
  28. <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" default="Color( 0, 0, 0, 1 )">
  29. The currently selected color.
  30. </member>
  31. <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true">
  32. If [code]true[/code], the alpha channel in the displayed [ColorPicker] will be visible.
  33. </member>
  34. <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" />
  35. </members>
  36. <signals>
  37. <signal name="color_changed">
  38. <argument index="0" name="color" type="Color">
  39. </argument>
  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" type="Texture">
  59. </theme_item>
  60. <theme_item name="disabled" type="StyleBox">
  61. </theme_item>
  62. <theme_item name="focus" type="StyleBox">
  63. </theme_item>
  64. <theme_item name="font" type="Font">
  65. </theme_item>
  66. <theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )">
  67. </theme_item>
  68. <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.3 )">
  69. </theme_item>
  70. <theme_item name="font_color_hover" type="Color" default="Color( 1, 1, 1, 1 )">
  71. </theme_item>
  72. <theme_item name="font_color_pressed" type="Color" default="Color( 0.8, 0.8, 0.8, 1 )">
  73. </theme_item>
  74. <theme_item name="hover" type="StyleBox">
  75. </theme_item>
  76. <theme_item name="hseparation" type="int" default="2">
  77. </theme_item>
  78. <theme_item name="normal" type="StyleBox">
  79. </theme_item>
  80. <theme_item name="pressed" type="StyleBox">
  81. </theme_item>
  82. </theme_items>
  83. </class>