CocosSharp.CCLabelTtf Class
is a subclass of TextureNode that knows how to render text labels.

See Also: CCLabelTtf Members

Syntax

public class CCLabelTtf : CCSprite, ICCTextContainer

Remarks

All features from TextureNode are valid in CocosSharp.CCLabelTTF

CocosSharp.CCLabelTTF

CocosSharp.CCLabelTTF objects are slow. Consider using CocosSharp.CCLabelAtlas or CocosSharp.CCLabelBMFont instead.

CocosSharp.CCLabelTTF CocosSharp.CCLabelAtlas CocosSharp.CCLabelBMFont

Custom ttf file can be put in assets/ or external storage that the Application can access. LabelTTF*label1=LabelTTF::create("alignmentleft","ADamnMess",fontSize,blockSize,kTextAlignmentLeft,kVerticalTextAlignmentCenter);LabelTTF*label2=LabelTTF::create("alignmentright","/mnt/sdcard/ScissorCuts.ttf",fontSize,blockSize,kTextAlignmentLeft,kVerticalTextAlignmentCenter);

LabelTTF*label1=LabelTTF::create( "alignmentleft" , "ADamnMess" ,fontSize,blockSize, kTextAlignmentLeft,kVerticalTextAlignmentCenter); LabelTTF*label2=LabelTTF::create( "alignmentright" , "/mnt/sdcard/ScissorCuts.ttf" ,fontSize,blockSize, kTextAlignmentLeft,kVerticalTextAlignmentCenter); LabelTTF*label1=LabelTTF::create( "alignmentleft" , "ADamnMess" ,fontSize,blockSize, LabelTTF*label1=LabelTTF::create( LabelTTF::create "alignmentleft" , "ADamnMess" ,fontSize,blockSize, kTextAlignmentLeft,kVerticalTextAlignmentCenter); kTextAlignmentLeft,kVerticalTextAlignmentCenter); LabelTTF*label2=LabelTTF::create( "alignmentright" , "/mnt/sdcard/ScissorCuts.ttf" ,fontSize,blockSize, LabelTTF*label2=LabelTTF::create( LabelTTF::create "alignmentright" , "/mnt/sdcard/ScissorCuts.ttf" ,fontSize,blockSize, kTextAlignmentLeft,kVerticalTextAlignmentCenter); kTextAlignmentLeft,kVerticalTextAlignmentCenter);

Requirements

Namespace: CocosSharp
Assembly: CocosSharp (in CocosSharp.dll)