#include <LabelTestNew.h>
◆ LabelAddChildTest()
| LabelAddChildTest::LabelAddChildTest |
( |
| ) |
|
在文件 LabelTestNew.cpp 第 2081 行定义.
2085 auto label = Label::createWithTTF(
"Label with child node:",
"fonts/arial.ttf", 24);
2086 label->setPosition(center.x, center.y);
2089 auto jump = JumpBy::create(1.0f, Vec2::ZERO, 60, 1);
2090 auto jump_4ever = RepeatForever::create(jump);
2091 label->runAction(jump_4ever);
2093 auto spite = Sprite::create(
"Images/SpookyPeas.png");
2094 spite->setAnchorPoint(Vec2::ANCHOR_MIDDLE_LEFT);
2095 spite->setPosition(label->getContentSize().width, label->getContentSize().height/2);
2096 label->addChild(spite);
static cocos2d::Vec2 center()
引用了 VisibleRect::center().
◆ CREATE_FUNC()
◆ title()
| std::string LabelAddChildTest::title |
( |
| ) |
const |
|
overridevirtual |
该类的文档由以下文件生成:
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/LabelTest/LabelTestNew.h
- /Users/yujizhu/Documents/Git/cocos2d-x-4.0/tests/cpp-tests/Classes/LabelTest/LabelTestNew.cpp