ColorPicker.xml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ColorPicker" inherits="BoxContainer" category="Core" version="3.1.2">
  3. <brief_description>
  4. Color picker control.
  5. </brief_description>
  6. <description>
  7. [Control] node displaying a color picker widget. It's useful for selecting a color from an RGB/RGBA colorspace.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="add_preset">
  13. <return type="void">
  14. </return>
  15. <argument index="0" name="color" type="Color">
  16. </argument>
  17. <description>
  18. Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them. Note: the presets list is only for [i]this[/i] color picker.
  19. </description>
  20. </method>
  21. <method name="erase_preset">
  22. <return type="void">
  23. </return>
  24. <argument index="0" name="color" type="Color">
  25. </argument>
  26. <description>
  27. Remove the given color from the list of color presets of this color picker.
  28. </description>
  29. </method>
  30. <method name="get_presets" qualifiers="const">
  31. <return type="PoolColorArray">
  32. </return>
  33. <description>
  34. Returns the list of colors in the presets of the color picker.
  35. </description>
  36. </method>
  37. </methods>
  38. <members>
  39. <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color">
  40. The currently selected color.
  41. </member>
  42. <member name="deferred_mode" type="bool" setter="set_deferred_mode" getter="is_deferred_mode">
  43. If [code]true[/code], the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues).
  44. </member>
  45. <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha">
  46. If [code]true[/code], shows an alpha channel slider (transparency).
  47. </member>
  48. <member name="raw_mode" type="bool" setter="set_raw_mode" getter="is_raw_mode">
  49. If [code]true[/code], allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR).
  50. </member>
  51. </members>
  52. <signals>
  53. <signal name="color_changed">
  54. <argument index="0" name="color" type="Color">
  55. </argument>
  56. <description>
  57. Emitted when the color is changed.
  58. </description>
  59. </signal>
  60. <signal name="preset_added">
  61. <argument index="0" name="color" type="Color">
  62. </argument>
  63. <description>
  64. Emitted when a preset is added.
  65. </description>
  66. </signal>
  67. <signal name="preset_removed">
  68. <argument index="0" name="color" type="Color">
  69. </argument>
  70. <description>
  71. Emitted when a preset is removed.
  72. </description>
  73. </signal>
  74. </signals>
  75. <constants>
  76. </constants>
  77. <theme_items>
  78. <theme_item name="add_preset" type="Texture">
  79. </theme_item>
  80. <theme_item name="color_hue" type="Texture">
  81. </theme_item>
  82. <theme_item name="color_sample" type="Texture">
  83. </theme_item>
  84. <theme_item name="h_width" type="int">
  85. </theme_item>
  86. <theme_item name="label_width" type="int">
  87. </theme_item>
  88. <theme_item name="margin" type="int">
  89. </theme_item>
  90. <theme_item name="preset_bg" type="Texture">
  91. </theme_item>
  92. <theme_item name="screen_picker" type="Texture">
  93. </theme_item>
  94. <theme_item name="sv_height" type="int">
  95. </theme_item>
  96. <theme_item name="sv_width" type="int">
  97. </theme_item>
  98. </theme_items>
  99. </class>