class_ysort.rst 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_YSort:
  4. YSort
  5. =====
  6. **Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. Sort all child nodes based on their Y positions.
  11. Member Functions
  12. ----------------
  13. +--------------------------+-----------------------------------------------------------------------------------------------------+
  14. | :ref:`bool<class_bool>` | :ref:`is_sort_enabled<class_YSort_is_sort_enabled>` **(** **)** const |
  15. +--------------------------+-----------------------------------------------------------------------------------------------------+
  16. | void | :ref:`set_sort_enabled<class_YSort_set_sort_enabled>` **(** :ref:`bool<class_bool>` enabled **)** |
  17. +--------------------------+-----------------------------------------------------------------------------------------------------+
  18. Description
  19. -----------
  20. 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.
  21. Member Function Description
  22. ---------------------------
  23. .. _class_YSort_is_sort_enabled:
  24. - :ref:`bool<class_bool>` **is_sort_enabled** **(** **)** const
  25. Returns true if the children nodes are being sorted.
  26. .. _class_YSort_set_sort_enabled:
  27. - void **set_sort_enabled** **(** :ref:`bool<class_bool>` enabled **)**
  28. Set whether the children nodes are sorted or not. (default true)