mirror of https://github.com/axmolengine/axmol.git
Merge branch 'master' of https://github.com/natural-law/cocos2d-x
This commit is contained in:
commit
1af72075bc
|
@ -6,6 +6,10 @@ enum {
|
||||||
kTagLabel2,
|
kTagLabel2,
|
||||||
kTagLabel3,
|
kTagLabel3,
|
||||||
kTagLabel4,
|
kTagLabel4,
|
||||||
|
|
||||||
|
kTagColor1,
|
||||||
|
kTagColor2,
|
||||||
|
kTagColor3,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int fontIdx = 0;
|
static int fontIdx = 0;
|
||||||
|
@ -99,6 +103,9 @@ void FontTest::showFont(const char *pFont)
|
||||||
removeChildByTag(kTagLabel2, true);
|
removeChildByTag(kTagLabel2, true);
|
||||||
removeChildByTag(kTagLabel3, true);
|
removeChildByTag(kTagLabel3, true);
|
||||||
removeChildByTag(kTagLabel4, true);
|
removeChildByTag(kTagLabel4, true);
|
||||||
|
removeChildByTag(kTagColor1, true);
|
||||||
|
removeChildByTag(kTagColor2, true);
|
||||||
|
removeChildByTag(kTagColor3, true);
|
||||||
|
|
||||||
CCLabelTTF *top = CCLabelTTF::create(pFont, pFont, 24);
|
CCLabelTTF *top = CCLabelTTF::create(pFont, pFont, 24);
|
||||||
CCLabelTTF *left = CCLabelTTF::create("alignment left", pFont, fontSize,
|
CCLabelTTF *left = CCLabelTTF::create("alignment left", pFont, fontSize,
|
||||||
|
@ -133,11 +140,11 @@ void FontTest::showFont(const char *pFont)
|
||||||
right->setPosition(ccp(blockSize.width*2, s.height/2));
|
right->setPosition(ccp(blockSize.width*2, s.height/2));
|
||||||
rightColor->setPosition(right->getPosition());
|
rightColor->setPosition(right->getPosition());
|
||||||
|
|
||||||
this->addChild(leftColor, -1);
|
this->addChild(leftColor, -1, kTagColor1);
|
||||||
this->addChild(left, 0, kTagLabel1);
|
this->addChild(left, 0, kTagLabel1);
|
||||||
this->addChild(rightColor, -1);
|
this->addChild(rightColor, -1, kTagColor2);
|
||||||
this->addChild(right, 0, kTagLabel2);
|
this->addChild(right, 0, kTagLabel2);
|
||||||
this->addChild(centerColor, -1);
|
this->addChild(centerColor, -1, kTagColor3);
|
||||||
this->addChild(center, 0, kTagLabel3);
|
this->addChild(center, 0, kTagLabel3);
|
||||||
this->addChild(top, 0, kTagLabel4);
|
this->addChild(top, 0, kTagLabel4);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue