YSort

Inherits: Node2D < CanvasItem < Node < Object

Category: Core

Brief Description

Sort all child nodes based on their Y positions.

Member Functions

bool is_sort_enabled ( ) const
void set_sort_enabled ( bool enabled )

Description

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.

Member Function Description

bool is_sort_enabled ( ) const

Returns true if the children nodes are being sorted.

void set_sort_enabled ( bool enabled )

Set whether the children nodes are sorted or not. (default true)

© 2014–2020 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/2.1/classes/class_ysort.html