#include <LabelTestNew.h>
◆ LabelFNTMultiLine()
| LabelFNTMultiLine::LabelFNTMultiLine |
( |
| ) |
|
在文件 LabelTestNew.cpp 第 415 行定义.
420 auto label1 = Label::createWithBMFont(
"fonts/bitmapFontTest3.fnt",
" Multi line\nLeft");
421 label1->setAnchorPoint(Vec2(0,0));
424 s = label1->getContentSize();
425 CCLOG(
"content size: %.2fx%.2f", s.width, s.height);
429 auto label2 = Label::createWithBMFont(
"fonts/bitmapFontTest3.fnt",
"Multi line\nCenter");
432 s= label2->getContentSize();
433 CCLOG(
"content size: %.2fx%.2f", s.width, s.height);
436 auto label3 = Label::createWithBMFont(
"fonts/bitmapFontTest3.fnt",
"Multi line\nRight\nThree lines Three");
437 label3->setAnchorPoint(Vec2(1, 1));
440 s = label3->getContentSize();
441 CCLOG(
"content size: %.2fx%.2f", s.width, s.height);
static cocos2d::Vec2 center()
static cocos2d::Vec2 rightTop()
static cocos2d::Vec2 leftBottom()
引用了 VisibleRect::center(), kTagBitmapAtlas1, kTagBitmapAtlas2, kTagBitmapAtlas3, VisibleRect::leftBottom() , 以及 VisibleRect::rightTop().
◆ CREATE_FUNC()
◆ subtitle()
| std::string LabelFNTMultiLine::subtitle |
( |
| ) |
const |
|
overridevirtual |
◆ title()
| std::string LabelFNTMultiLine::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