Difference between revisions of "Sprite:swapChildrenAt"

 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Available since:''' Gideros 2015.04.04<br/>
+
<languages />
=== Description ===
+
'''<translate>Available since</translate>:''' Gideros 2015.04.04<br/>
<br />
+
'''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
 +
=== <translate>Description</translate> ===
 +
<translate><br />
 
Swaps two child sprites at specifed indexes. Each index must be between 1<br />
 
Swaps two child sprites at specifed indexes. Each index must be between 1<br />
 
and the index number of the last child.  Can be used to sort sprites into<br />
 
and the index number of the last child.  Can be used to sort sprites into<br />
 
a specific order much faster than adding and removing sprites.<br/>
 
a specific order much faster than adding and removing sprites.<br/>
<br />
+
<br /></translate>
 
<source lang="lua">
 
<source lang="lua">
 
  Sprite:swapChildrenAt(index1,index2)
 
  Sprite:swapChildrenAt(index1,index2)
 
</source>
 
</source>
=== Parameters ===
+
=== <translate>Parameters</translate> ===
'''index1''': (number) The child index of the first sprite to swap. <br/>
+
'''index1''': (number) <translate>The child index of the first sprite to swap.</translate> <br/>
'''index2''': (number) The child index of the second sprite to swap. <br/>
+
'''index2''': (number) <translate>The child index of the second sprite to swap.</translate> <br/>
 +
 
 +
{{Sprite}}

Latest revision as of 01:25, 4 December 2019


Available since: Gideros 2015.04.04
Class: Sprite

Description


Swaps two child sprites at specifed indexes. Each index must be between 1
and the index number of the last child. Can be used to sort sprites into
a specific order much faster than adding and removing sprites.

 Sprite:swapChildrenAt(index1,index2)

Parameters

index1: (number) The child index of the first sprite to swap.
index2: (number) The child index of the second sprite to swap.