ColorRect.xml 886 B

12345678910111213141516171819202122232425
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ColorRect" inherits="Control" version="4.0">
  3. <brief_description>
  4. Colored rectangle.
  5. </brief_description>
  6. <description>
  7. Displays a rectangle filled with a solid [member color]. If you need to display the border alone, consider using [ReferenceRect] instead.
  8. </description>
  9. <tutorials>
  10. <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link>
  11. </tutorials>
  12. <members>
  13. <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
  14. The fill color.
  15. [codeblocks]
  16. [gdscript]
  17. $ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect's color to red.
  18. [/gdscript]
  19. [csharp]
  20. GetNode&lt;ColorRect&gt;("ColorRect").Color = new Color(1, 0, 0, 1); // Set ColorRect's color to red.
  21. [/csharp]
  22. [/codeblocks]
  23. </member>
  24. </members>
  25. </class>