How do I get text to center and auto fill to work?

TannmanTannman USMember

Here is the code for my title:

        CCLabel title = new CCLabel ("Coin Collector", "TimesNewRoman", 36);
        title.AnchorPoint = CCPoint.AnchorMiddle;
        AddChild (title);

Is this right?

Here is the code for the resolution:

        float Width = 768.0f;
        float Height = 1024.0f;

        CCScene.SetDefaultDesignResolution (Width, Height, CCSceneResolutionPolicy.ShowAll);

Is this right?

The image below shows the app in debug mode on my Motorola XT1064 (API 21)

I made the background blue. The text is white (in the corner) and the black on the top and bottom is how big my screen is. I have tested this on a Samsung Note 3 to make sure it was not my device and the results were the same.

Answers

Sign In or Register to comment.