fixing typos

This commit is contained in:
vision 2014-05-26 16:32:13 +08:00
parent 28d30a5c40
commit 20bae53f4a
2 changed files with 4 additions and 4 deletions

View File

@ -601,13 +601,13 @@ std::string CaptureScreenTest::title() const
std::string CaptureScreenTest::subtitle() const std::string CaptureScreenTest::subtitle() const
{ {
return "Capture screen test, press the munu items to capture the screen"; return "Capture screen test, press the menu items to capture the screen";
} }
void CaptureScreenTest::onCaptured(Ref*) void CaptureScreenTest::onCaptured(Ref*)
{ {
Director::getInstance()->getTextureCache()->removeTextureForKey(_filename); Director::getInstance()->getTextureCache()->removeTextureForKey(_filename);
removeChildByTag(ChildTag); removeChildByTag(childTag);
_filename = "CaptureScreenTest.png"; _filename = "CaptureScreenTest.png";
Director::getInstance()->captureScreen(CC_CALLBACK_2(CaptureScreenTest::afterCaptured, this), _filename); Director::getInstance()->captureScreen(CC_CALLBACK_2(CaptureScreenTest::afterCaptured, this), _filename);
} }
@ -617,7 +617,7 @@ void CaptureScreenTest::afterCaptured(bool succeed, const std::string& outputFil
if (succeed) if (succeed)
{ {
auto sp = Sprite::create(outputFile); auto sp = Sprite::create(outputFile);
addChild(sp, 0, ChildTag); addChild(sp, 0, childTag);
Size s = Director::getInstance()->getWinSize(); Size s = Director::getInstance()->getWinSize();
sp->setPosition(s.width / 2, s.height / 2); sp->setPosition(s.width / 2, s.height / 2);
sp->setScale(0.25); sp->setScale(0.25);

View File

@ -148,7 +148,7 @@ protected:
class CaptureScreenTest : public MultiSceneTest class CaptureScreenTest : public MultiSceneTest
{ {
static const int ChildTag = 119; static const int childTag = 119;
public: public:
CREATE_FUNC(CaptureScreenTest); CREATE_FUNC(CaptureScreenTest);
virtual std::string title() const override; virtual std::string title() const override;