YSort.xml 1.0 KB

12345678910111213141516171819202122
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="YSort" inherits="Node2D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. Sort all child nodes based on their Y positions.
  5. </brief_description>
  6. <description>
  7. Sort all child nodes based on their Y positions. The child node must inherit from [CanvasItem] for it to be sorted. Nodes that have a higher Y position will be drawn later, so they will appear on top of nodes that have a lower Y position.
  8. Nesting of YSort nodes is possible. Children YSort nodes will be sorted in the same space as the parent YSort, allowing to better organize a scene or divide it in multiple ones, yet keep the unique sorting.
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <methods>
  13. </methods>
  14. <members>
  15. <member name="sort_enabled" type="bool" setter="set_sort_enabled" getter="is_sort_enabled" default="true">
  16. If [code]true[/code], child nodes are sorted, otherwise sorting is disabled.
  17. </member>
  18. </members>
  19. <constants>
  20. </constants>
  21. </class>