Esempio n. 1
0
BMFontInit::BMFontInit()
{
    CCSize s = CCDirector::sharedDirector()->getWinSize();

    CCLabelBMFont* bmFont = new CCLabelBMFont();
    bmFont->init();
    bmFont->autorelease();
    //CCLabelBMFont* bmFont = [CCLabelBMFont create:@"Foo" fntFile:@"arial-unicode-26.fnt"];
    bmFont->setFntFile("fonts/helvetica-32.fnt");
    bmFont->setString("It is working!");
    this->addChild(bmFont);
    bmFont->setPosition(ccp(s.width/2,s.height/4*2));
}
Esempio n. 2
0
Issue1343::Issue1343()
{
    CCSize s = CCDirector::sharedDirector()->getWinSize();

    CCLabelBMFont* bmFont = new CCLabelBMFont();
    bmFont->init();
    bmFont->setFntFile("fonts/font-issue1343.fnt");
    bmFont->setString("ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz.,'");
    this->addChild(bmFont);
    bmFont->release();
    bmFont->setScale(0.3f);

    bmFont->setPosition(ccp(s.width/2,s.height/4*2));
}