Difference between revisions of "TextField:getTextPositionFromPoint"
From GiderosMobile
(removed language stuff) |
|||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | + | '''Available since:''' Gideros 2019.5<br/> | |
− | ''' | + | '''Class:''' [[TextField]]<br/> |
− | ''' | + | |
− | === | + | === Description === |
− | + | Returns the offset into a text from x,y coordinates. | |
<source lang="lua"> | <source lang="lua"> | ||
(number),(number),(number) = TextField:getTextPositionFromPoint(x,y) | (number),(number),(number) = TextField:getTextPositionFromPoint(x,y) | ||
</source> | </source> | ||
− | === | + | |
− | '''x''': (number) | + | === Parameters === |
− | '''y''': (number) | + | '''x''': (number) the queried X coordinate<br/> |
− | === | + | '''y''': (number) the queried Y coordinate<br/> |
− | ''' | + | |
− | ''' | + | === Return values === |
− | ''' | + | '''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}} | {{TextField}} |
Revision as of 02:24, 26 December 2021
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
- TextField
- TextField.new
- TextField:getLayout
- TextField:getLetterSpacing
- TextField:getLineHeight
- TextField:getPointFromTextPosition
- TextField:getSample
- TextField:getText
- TextField:getTextColor
- TextField:getTextPositionFromPoint
- TextField:setFont
- TextField:setLayout
- TextField:setLetterSpacing
- TextField:setSample
- TextField:setText
- TextField:setTextColor