PuzzleSDK
LabelIssue15214类 参考

#include <LabelTestNew.h>

+ 类 LabelIssue15214 继承关系图:
+ LabelIssue15214 的协作图:

Public 成员函数

 CREATE_FUNC (LabelIssue15214)
 
 LabelIssue15214 ()
 
virtual std::string title () const override
 
virtual std::string subtitle () const override
 
- Public 成员函数 继承自 TestCase
 TestCase ()
 
 ~TestCase ()
 
virtual Type getTestType () const
 
virtual float getDuration () const
 
virtual std::string getExpectedOutput () const
 
virtual std::string getActualOutput () const
 
virtual void restartTestCallback (cocos2d::Ref *sender)
 
virtual void nextTestCallback (cocos2d::Ref *sender)
 
virtual void priorTestCallback (cocos2d::Ref *sender)
 
virtual void onBackCallback (cocos2d::Ref *sender)
 
void setTestSuite (TestSuite *testSuite)
 
TestSuitegetTestSuite () const
 
float getRunTime () const
 
void setTestCaseName (const std::string &name)
 
std::string getTestCaseName () const
 
const cocos2d::Label * getSubtitleLable () const
 
const cocos2d::MenuItemImage * getRestartTestItem () const
 
virtual void onEnter () override
 

额外继承的成员函数

- Public 类型 继承自 TestCase
enum class  Type { ROBUSTNESS , UNIT , GRAPHICAL_STATIC , MANUAL }
 
- Public 属性 继承自 TestCase
CC_CONSTRUCTOR_ACCESS __pad0__: virtual bool init() override
 
- Protected 属性 继承自 TestCase
cocos2d::MenuItemImage * _priorTestItem
 
cocos2d::MenuItemImage * _restartTestItem
 
cocos2d::MenuItemImage * _nextTestItem
 
cocos2d::Label * _titleLabel
 
cocos2d::Label * _subtitleLabel
 

详细描述

在文件 LabelTestNew.h915 行定义.

构造及析构函数说明

◆ LabelIssue15214()

LabelIssue15214::LabelIssue15214 ( )

在文件 LabelTestNew.cpp3380 行定义.

3381{
3382 auto size = Director::getInstance()->getVisibleSize();
3383
3384 // 1
3385 Label* label = Label::createWithTTF("TTF with setColor()", "fonts/arial.ttf", 24.0f);
3386 label->enableUnderline();
3387 label->setColor(cocos2d::Color3B::BLUE);
3388 label->setPosition(size.width/2, size.height/5*4);
3389 this->addChild(label);
3390
3391 // 2
3392 Label* label2 = Label::createWithSystemFont("System with setColor()", "Verdana", 24.0f);
3393 label2->enableUnderline();
3394 label2->setColor(cocos2d::Color3B::BLUE);
3395 label2->setPosition(size.width/2, size.height/5*3);
3396 this->addChild(label2);
3397
3398 // 3
3399 Label* label3 = Label::createWithTTF("TTF with setTextColor()", "fonts/arial.ttf", 24.0f);
3400 label3->enableUnderline();
3401 label3->setTextColor(Color4B::BLUE);
3402 label3->setPosition(size.width/2, size.height/5*2);
3403 this->addChild(label3);
3404
3405 // 4
3406 Label* label4 = Label::createWithSystemFont("System with setTextColor()", "Verdana", 24.0f);
3407 label4->enableUnderline();
3408 label4->setTextColor(Color4B::BLUE);
3409 label4->setPosition(size.width/2, size.height/5*1);
3410 this->addChild(label4);
3411}

成员函数说明

◆ CREATE_FUNC()

LabelIssue15214::CREATE_FUNC ( LabelIssue15214  )

◆ subtitle()

std::string LabelIssue15214::subtitle ( ) const
overridevirtual

重载 TestCase .

在文件 LabelTestNew.cpp3418 行定义.

3419{
3420 return "Font + underline: same color with setColor()";
3421}

◆ title()

std::string LabelIssue15214::title ( ) const
overridevirtual

重载 TestCase .

在文件 LabelTestNew.cpp3413 行定义.

3414{
3415 return "Github Issue 15214";
3416}

该类的文档由以下文件生成: