#include <LabelTestNew.h>
|
| static void | setLetterColors (cocos2d::Label *label, const cocos2d::Color3B &color) |
| |
◆ LabelLetterColorsTest()
| LabelLetterColorsTest::LabelLetterColorsTest |
( |
| ) |
|
在文件 LabelTestNew.cpp 第 3574 行定义.
3577 auto label = Label::createWithTTF(
"",
"fonts/arial.ttf", 24);
3578 label->setPosition(center.x, center.y);
3581 label->setString(
"1\n2\n3");
3584 label->setString(
"abcd\ne");
static void setLetterColors(cocos2d::Label *label, const cocos2d::Color3B &color)
static cocos2d::Vec2 center()
引用了 VisibleRect::center() , 以及 setLetterColors().
◆ CREATE_FUNC()
◆ setLetterColors()
| void LabelLetterColorsTest::setLetterColors |
( |
cocos2d::Label * |
label, |
|
|
const cocos2d::Color3B & |
color |
|
) |
| |
|
staticprivate |
在文件 LabelTestNew.cpp 第 3595 行定义.
3596 int n = label->getStringLength();
3597 for (
int i = 0; i < n; ++i) {
3598 Sprite* letter = label->getLetter(i);
3599 if (letter !=
nullptr)
3600 letter->setColor(color);
被这些函数引用 LabelLetterColorsTest().
◆ subtitle()
| std::string LabelLetterColorsTest::subtitle |
( |
| ) |
const |
|
overridevirtual |
◆ title()
| std::string LabelLetterColorsTest::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