class_ysort.rst 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/YSort.xml.
  6. .. _class_YSort:
  7. YSort
  8. =====
  9. **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. Sort all child nodes based on their Y positions.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Sort all child nodes based on their Y positions. The child node must inherit from :ref:`CanvasItem<class_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.
  15. 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.
  16. .. rst-class:: classref-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +-------------------------+--------------------------------------------------------+----------+
  22. | :ref:`bool<class_bool>` | :ref:`sort_enabled<class_YSort_property_sort_enabled>` | ``true`` |
  23. +-------------------------+--------------------------------------------------------+----------+
  24. .. rst-class:: classref-section-separator
  25. ----
  26. .. rst-class:: classref-descriptions-group
  27. Property Descriptions
  28. ---------------------
  29. .. _class_YSort_property_sort_enabled:
  30. .. rst-class:: classref-property
  31. :ref:`bool<class_bool>` **sort_enabled** = ``true``
  32. .. rst-class:: classref-property-setget
  33. - void **set_sort_enabled** **(** :ref:`bool<class_bool>` value **)**
  34. - :ref:`bool<class_bool>` **is_sort_enabled** **(** **)**
  35. If ``true``, child nodes are sorted, otherwise sorting is disabled.
  36. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  37. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  38. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  39. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`