Difference between revisions of "TextField:getTextPositionFromPoint"
From GiderosMobile
(removed language stuff) |
m (Text replacement - "<source" to "<syntaxhighlight") |
||
Line 5: | Line 5: | ||
=== Description === | === Description === | ||
Returns the offset into a text from x,y coordinates. | Returns the offset into a text from x,y coordinates. | ||
− | < | + | <syntaxhighlight lang="lua"> |
(number),(number),(number) = TextField:getTextPositionFromPoint(x,y) | (number),(number),(number) = TextField:getTextPositionFromPoint(x,y) | ||
</source> | </source> |
Revision as of 14:31, 13 July 2023
Available since: Gideros 2019.5
Class: TextField
Description
Returns the offset into a text from x,y coordinates. <syntaxhighlight lang="lua"> (number),(number),(number) = TextField:getTextPositionFromPoint(x,y) </source>
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