#include <LabelTestNew.h>
◆ LabelTTFFontsTestNew()
| LabelTTFFontsTestNew::LabelTTFFontsTestNew |
( |
| ) |
|
在文件 LabelTestNew.cpp 第 1171 行定义.
1173 const char *ttfpaths[] = {
1174 "fonts/A Damn Mess.ttf",
1175 "fonts/Abberancy.ttf",
1176 "fonts/Abduction.ttf",
1177 "fonts/American Typewriter.ttf",
1178 "fonts/Paint Boy.ttf",
1179 "fonts/Schwarzwald.ttf",
1180 "fonts/Scissor Cuts.ttf",
1183 int fontCount =
sizeof(ttfpaths) /
sizeof(ttfpaths[0]);
1184 auto size = Director::getInstance()->getWinSize();
1185 TTFConfig ttfConfig(ttfpaths[0],20, GlyphCollection::NEHE);
1187 for (
int i = 0; i < fontCount; ++i) {
1188 ttfConfig.fontFilePath = ttfpaths[i];
1189 auto label = Label::createWithTTF(ttfConfig, ttfpaths[i], TextHAlignment::CENTER,0);
1191 label->setPosition(size.width / 2, ((size.height * 0.6) / fontCount * i) + (size.height / 4));
1194 log(
"ERROR: Cannot load: %s", ttfpaths[i]);
◆ CREATE_FUNC()
◆ subtitle()
| std::string LabelTTFFontsTestNew::subtitle |
( |
| ) |
const |
|
overridevirtual |
◆ title()
| std::string LabelTTFFontsTestNew::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