You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.
The code below works fine when using CCLabelTtf - the label will be centered both horizontally and vertically. However with CCLabel, horizontal alignment won't work. The label is all the way to the left side.
Interesting: CCTextAlignment.Center puts it all the way to the left, CCTextAlignment.Left (!) centers it perfectly and CCTextAlignment.Right places the label half way off the screen to the left.
var label = new CCLabel ("Bildschirm berühren!", "Times New Roman", 44)
{
Position = this.VisibleBoundsWorldspace.Center,
Color = CCColor3B.White,
HorizontalAlignment = CCTextAlignment.Center,
VerticalAlignment = CCVerticalTextAlignment.Center,
AnchorPoint = CCPoint.AnchorMiddle,
};
this.AddChild (label);
The text was updated successfully, but these errors were encountered:
The code below works fine when using CCLabelTtf - the label will be centered both horizontally and vertically. However with CCLabel, horizontal alignment won't work. The label is all the way to the left side.
Interesting: CCTextAlignment.Center puts it all the way to the left, CCTextAlignment.Left (!) centers it perfectly and CCTextAlignment.Right places the label half way off the screen to the left.
The text was updated successfully, but these errors were encountered: