Game Development Reference
In-Depth Information
verticalAlignmentMode value to SKLabelVerticalAlignmentMode.Top ,
as shown here:
simpleLabel.verticalAlignmentMode
= SKLabelVerticalAlignmentMode.Top
Once you have made this change, run the application again. You will now see that the text
has shifted down even further so that the top of the text is at simpleLabel 's origin, as
shown in Figure 7-6 .
Figure 7-6 . The simple SKLabelNode example with its verticalAlignmentMode set to SKLabelVerticalAlign-
mentMode.Top
The last vertical alignment option is the value SKLabelVerticalAlign-
mentMode.Bottom . This value is used to position the text so that the bottom of the text
is on the node's origin. To see how the value changes the text layout, set simpleLa-
Search WWH ::




Custom Search