ColorPicker.xml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ColorPicker" inherits="BoxContainer" category="Core" version="3.1">
  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. <demos>
  12. </demos>
  13. <methods>
  14. <method name="add_preset">
  15. <return type="void">
  16. </return>
  17. <argument index="0" name="color" type="Color">
  18. </argument>
  19. <description>
  20. 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.
  21. </description>
  22. </method>
  23. <method name="erase_preset">
  24. <return type="void">
  25. </return>
  26. <argument index="0" name="color" type="Color">
  27. </argument>
  28. <description>
  29. Remove the given color from the list of color presets of this color picker.
  30. </description>
  31. </method>
  32. <method name="get_presets" qualifiers="const">
  33. <return type="PoolColorArray">
  34. </return>
  35. <description>
  36. Return the list of colors in the presets of the color picker.
  37. </description>
  38. </method>
  39. </methods>
  40. <members>
  41. <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color">
  42. The currently selected color.
  43. </member>
  44. <member name="deferred_mode" type="bool" setter="set_deferred_mode" getter="is_deferred_mode">
  45. 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).
  46. </member>
  47. <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha">
  48. If [code]true[/code], shows an alpha channel slider (transparency).
  49. </member>
  50. <member name="raw_mode" type="bool" setter="set_raw_mode" getter="is_raw_mode">
  51. 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).
  52. </member>
  53. </members>
  54. <signals>
  55. <signal name="color_changed">
  56. <argument index="0" name="color" type="Color">
  57. </argument>
  58. <description>
  59. Emitted when the color is changed.
  60. </description>
  61. </signal>
  62. <signal name="preset_added">
  63. <argument index="0" name="color" type="Color">
  64. </argument>
  65. <description>
  66. Emitted when a preset is added.
  67. </description>
  68. </signal>
  69. <signal name="preset_removed">
  70. <argument index="0" name="color" type="Color">
  71. </argument>
  72. <description>
  73. Emitted when a preset is removed.
  74. </description>
  75. </signal>
  76. </signals>
  77. <constants>
  78. </constants>
  79. <theme_items>
  80. <theme_item name="add_preset" type="Texture">
  81. </theme_item>
  82. <theme_item name="color_hue" type="Texture">
  83. </theme_item>
  84. <theme_item name="color_sample" type="Texture">
  85. </theme_item>
  86. <theme_item name="h_width" type="int">
  87. </theme_item>
  88. <theme_item name="label_width" type="int">
  89. </theme_item>
  90. <theme_item name="margin" type="int">
  91. </theme_item>
  92. <theme_item name="preset_bg" type="Texture">
  93. </theme_item>
  94. <theme_item name="screen_picker" type="Texture">
  95. </theme_item>
  96. <theme_item name="sv_height" type="int">
  97. </theme_item>
  98. <theme_item name="sv_width" type="int">
  99. </theme_item>
  100. </theme_items>
  101. </class>