# nodesnim/nodes2d/ysort

Dark Mode

Search:
Group by:

Sorts children by its Y position.

# Imports

../thirdparty/opengl, ../core/vector2, ../core/rect2, ../core/anchor, ../core/input, ../core/enums, ../nodes/node, node2d

# Types

    YSortObj = object of Node2DObj
      for_all_childs*: bool

    YSortRef = ref YSortObj

# Procs

    proc YSort(name: string = "YSort"): YSortRef {...}{.raises: [], tags: [].}

  Creates a new YSort.

  Arguments:

  - `name` is a node name.

  Examples:

      var node = YSort("YSort")

# Methods

    method draw(self: YSortRef; w, h: GLfloat) {...}{.raises: [Exception], tags: [RootEffect].}

  this method uses in the `window.nim`.

    method duplicate(self: YSortRef): YSortRef {...}{.base, raises: [], tags: [].}

  Duplicates YSort and create a new YSort object.