PuzzleSDK
Issue4160类 参考

#include <NewEventDispatcherTest.h>

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

Public 成员函数

 CREATE_FUNC (Issue4160)
 
 Issue4160 ()
 
virtual ~Issue4160 ()
 
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
 

详细描述

在文件 NewEventDispatcherTest.h242 行定义.

构造及析构函数说明

◆ Issue4160()

Issue4160::Issue4160 ( )

在文件 NewEventDispatcherTest.cpp1354 行定义.

1355{
1356 Vec2 origin = Director::getInstance()->getVisibleOrigin();
1357 Size size = Director::getInstance()->getVisibleSize();
1358
1359 auto sprite1 = TouchableSprite::create(-30);
1360 sprite1->setTexture("Images/CyanSquare.png");
1361 sprite1->setPosition(origin+Vec2(size.width/2, size.height/2) + Vec2(-80.0f, 40.0f));
1362 addChild(sprite1, -10);
1363
1364 auto sprite2 = TouchableSprite::create(-20);
1365 sprite2->setTexture("Images/MagentaSquare.png");
1366 sprite2->removeListenerOnTouchEnded(true);
1367 sprite2->setPosition(origin+Vec2(size.width/2, size.height/2));
1368 addChild(sprite2, -20);
1369
1370 auto sprite3 = TouchableSprite::create(-10);
1371 sprite3->setTexture("Images/YellowSquare.png");
1372 sprite3->setPosition(Vec2(0, 0));
1373 sprite2->addChild(sprite3, -1);
1374}
static TouchableSprite * create(int priority=0)

引用了 TouchableSprite::create().

+ 函数调用图:

◆ ~Issue4160()

Issue4160::~Issue4160 ( )
virtual

在文件 NewEventDispatcherTest.cpp1376 行定义.

1377{
1378}

成员函数说明

◆ CREATE_FUNC()

Issue4160::CREATE_FUNC ( Issue4160  )

◆ subtitle()

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

重载 TestCase .

在文件 NewEventDispatcherTest.cpp1385 行定义.

1386{
1387 return "Touch the red block twice \n should not crash and the red one couldn't be touched";
1388}

◆ title()

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

重载 EventDispatcherTestDemo .

在文件 NewEventDispatcherTest.cpp1380 行定义.

1381{
1382 return "Issue 4160: Out of range exception";
1383}

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