Skip to content

fixed #599 #392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 12, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/tests/BugsTest/BugsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ void BugsTestMainLayer::onEnter()

CCSize s = CCDirector::sharedDirector()->getWinSize();
m_pItmeMenu = CCMenu::menuWithItems(NULL);
m_pItmeMenu->setPosition( CCPointZero );
CCMenuItemFont::setFontName("Arial");
CCMenuItemFont::setFontSize(24);
for (int i = 0; i < MAX_COUNT; ++i)
Expand All @@ -63,6 +62,7 @@ void BugsTestMainLayer::onEnter()
m_pItmeMenu->addChild(pItem, kItemTagBasic + i);
}

m_pItmeMenu->setPosition(s_tCurPos);
addChild(m_pItmeMenu);
setIsTouchEnabled(true);
}
Expand Down
2 changes: 2 additions & 0 deletions tests/tests/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ static TestScene* CreateTestScene(int nIdx)
TestController::TestController()
: m_tBeginPos(CCPointZero)
{
CCDirector::sharedDirector()->setDeviceOrientation(CCDeviceOrientationPortrait);

// add close menu
CCMenuItemImage *pCloseItem = CCMenuItemImage::itemFromNormalImage(s_pPathClose, s_pPathClose, this, menu_selector(TestController::closeCallback) );
CCMenu* pMenu =CCMenu::menuWithItems(pCloseItem, NULL);
Expand Down
11 changes: 0 additions & 11 deletions tests/tests/testBasic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,3 @@ TestScene::TestScene(bool bPortrait)
// 54321 is the tag of BackToMainMenuLayer
addChild(pLayer, 1000, 54321);
}

void TestScene::onExit()
{
if (m_bPortrait)
{
// turn back to the default orientation
CCDirector::sharedDirector()->setDeviceOrientation(CCDeviceOrientationPortrait);
}

CCScene::onExit();
}
1 change: 0 additions & 1 deletion tests/tests/testBasic.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class TestScene : public CCScene
TestScene(bool bPortrait = false);

virtual void runThisTest() = 0;
virtual void onExit();

protected:
bool m_bPortrait; // indicate if this test case requires portrait mode
Expand Down