mirror of https://github.com/axmolengine/axmol.git
issue #4629: add test case for group command
This commit is contained in:
parent
f9ac3c82fc
commit
beda294be1
|
@ -35,6 +35,7 @@ static std::function<Layer*()> createFunctions[] =
|
||||||
{
|
{
|
||||||
CL(NewSpriteTest),
|
CL(NewSpriteTest),
|
||||||
CL(NewSpriteBatchTest),
|
CL(NewSpriteBatchTest),
|
||||||
|
CL(GroupCommandTest),
|
||||||
CL(NewClippingNodeTest),
|
CL(NewClippingNodeTest),
|
||||||
CL(NewDrawNodeTest),
|
CL(NewDrawNodeTest),
|
||||||
CL(NewCullingTest),
|
CL(NewCullingTest),
|
||||||
|
@ -222,6 +223,28 @@ std::string NewSpriteTest::subtitle() const
|
||||||
return "SpriteTest";
|
return "SpriteTest";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GroupCommandTest::GroupCommandTest()
|
||||||
|
{
|
||||||
|
auto sprite = Sprite::create("Images/grossini.png");
|
||||||
|
Size winSize = Director::getInstance()->getWinSize();
|
||||||
|
sprite->setPosition(winSize.width/2,winSize.height/2);
|
||||||
|
addChild(sprite);
|
||||||
|
}
|
||||||
|
|
||||||
|
GroupCommandTest::~GroupCommandTest()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string GroupCommandTest::title() const
|
||||||
|
{
|
||||||
|
return "Renderer";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string GroupCommandTest::subtitle() const
|
||||||
|
{
|
||||||
|
return "GroupCommandTest: You should see a sprite";
|
||||||
|
}
|
||||||
|
|
||||||
//-------- New Sprite Batch Test
|
//-------- New Sprite Batch Test
|
||||||
|
|
||||||
NewSpriteBatchTest::NewSpriteBatchTest()
|
NewSpriteBatchTest::NewSpriteBatchTest()
|
||||||
|
|
|
@ -56,6 +56,19 @@ protected:
|
||||||
virtual ~NewSpriteTest();
|
virtual ~NewSpriteTest();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class GroupCommandTest : public MultiSceneTest
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CREATE_FUNC(GroupCommandTest);
|
||||||
|
|
||||||
|
virtual std::string title() const override;
|
||||||
|
virtual std::string subtitle() const override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
GroupCommandTest();
|
||||||
|
virtual ~GroupCommandTest();
|
||||||
|
};
|
||||||
|
|
||||||
class NewSpriteBatchTest : public MultiSceneTest
|
class NewSpriteBatchTest : public MultiSceneTest
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in New Issue