Difference between revisions of "TextField:getTextPositionFromPoint"

From GiderosMobile
(Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' Gideros 2019.5<br/> '''<translate>Class</translate>:''' TextField<br/> =...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2019.5<br/>
'''<translate>Available since</translate>:''' Gideros 2019.5<br/>
+
'''Class:''' [[TextField]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/TextField|TextField]]<br/>
+
 
=== <translate>Description</translate> ===
+
=== Description ===
<translate>returns the offset into a text from x,y coordinates<br /></translate>
+
Returns the offset into a text from x,y coordinates.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(number),(number),(number) = TextField:getTextPositionFromPoint(x,y)
 
(number),(number),(number) = TextField:getTextPositionFromPoint(x,y)
</source>
+
</syntaxhighlight>
=== <translate>Parameters</translate> ===
+
 
'''x''': (number) <translate>The queried X coordinate.</translate> <br/>
+
=== Parameters ===
'''y''': (number) <translate>The queried Y coordinate.</translate> <br/>
+
'''x''': (number) the queried X coordinate<br/>
=== <translate>Return values</translate> ===
+
'''y''': (number) the queried Y coordinate<br/>
'''<translate>Returns</translate>''' (number) <translate>The resolved byte offset within the text string.</translate><br/>
+
 
'''<translate>Returns</translate>''' (number) <translate>The corrected X coordinate.</translate><br/>
+
=== Return values ===
'''<translate>Returns</translate>''' (number) <translate>The corrected Y coordinate.</translate><br/>
+
'''Returns''' (number) the resolved byte offset within the text string<br/>
 +
'''Returns''' (number) the corrected X coordinate<br/>
 +
'''Returns''' (number) the corrected Y coordinate<br/>
 +
 
 +
{{TextField}}

Latest revision as of 14:33, 13 July 2023

Available since: Gideros 2019.5
Class: TextField

Description

Returns the offset into a text from x,y coordinates.

(number),(number),(number) = TextField:getTextPositionFromPoint(x,y)

Parameters

x: (number) the queried X coordinate
y: (number) the queried Y coordinate

Return values

Returns (number) the resolved byte offset within the text string
Returns (number) the corrected X coordinate
Returns (number) the corrected Y coordinate