Difference between revisions of "Sprite:getChildrenAtPoint"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2018.12.1<br/>
'''<translate>Available since</translate>:''' Gideros 2018.12.1<br/>
+
'''Class:''' [[Sprite]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
+
 
=== <translate>Description</translate> ===
+
=== Description ===
<translate><br />
+
Returns the children Sprites that correspond to the given screen coordinates.
Returns the children Sprites that correspond to the given screen coordinates.<br />
+
<syntaxhighlight lang="lua">
<br /></translate>
 
<source lang="lua">
 
 
(table) = Sprite:getChildrenAtPoint(x,y,visible,nosubs)
 
(table) = Sprite:getChildrenAtPoint(x,y,visible,nosubs)
</source>
+
</syntaxhighlight>
=== <translate>Parameters</translate> ===
+
 
'''x''': (number) <translate>x coordinate in global space.</translate> <br/>
+
=== Parameters ===
'''y''': (number) <translate>y coordinate in global space.</translate> <br/>
+
'''x''': (number) x coordinate in global space<br/>
'''visible''': (boolean) <translate>Only report visible sprites.</translate> <br/>
+
'''y''': (number) y coordinate in global space<br/>
'''nosubs''': (boolean) <translate>Don't report children of this sprite's children.</translate> <br/>
+
'''visible''': (boolean) only report visible sprites<br/>
=== <translate>Return values</translate> ===
+
'''nosubs''': (boolean) don't report children of this sprite children<br/>
'''<translate>Returns</translate>''' (table) <translate>A list of Sprites that were found at that screen location.</translate><br/>
+
 
 +
=== Return values ===
 +
'''Returns''' (table) a list of Sprites that were found at that screen location<br/>
  
 
{{Sprite}}
 
{{Sprite}}

Latest revision as of 15:33, 13 July 2023

Available since: Gideros 2018.12.1
Class: Sprite

Description

Returns the children Sprites that correspond to the given screen coordinates.

(table) = Sprite:getChildrenAtPoint(x,y,visible,nosubs)

Parameters

x: (number) x coordinate in global space
y: (number) y coordinate in global space
visible: (boolean) only report visible sprites
nosubs: (boolean) don't report children of this sprite children

Return values

Returns (table) a list of Sprites that were found at that screen location