Texts
Hey! You’re going to display your first object on the device screen: a text!
Display a Simple Text
You can display a text anywhere on the screen With a single line of code:
This line of code creates a text object at the position 100 (x) and 200 (y) using the system font, With a height of 20 pixels.
Regarding the Position
The x and y positions refer to the center position of the text. If you need to position your object relative to its left, top, bottom, or right points, you need to modify the anchors before creating the text object.
Anchor points are used to align display objects around a particular relative point, and are specified ...
Get Create 2D Mobile Games with Corona SDK now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.