Merge pull request #266 from natural-law/master

Modify the test code for the right device orientation.
This commit is contained in:
minggo 2011-05-11 19:34:55 -07:00
commit 52305461c5
1 changed files with 4 additions and 4 deletions

View File

@ -19,9 +19,6 @@ static TestScene* CreateTestScene(int nIdx)
{
CCDirector::sharedDirector()->purgeCachedData();
// change to default orientation
ChangeOrientation(CCDeviceOrientationPortrait);
TestScene* pScene = NULL;
switch (nIdx)
@ -49,7 +46,7 @@ static TestScene* CreateTestScene(int nIdx)
case TEST_COCOSNODE:
pScene = new CocosNodeTestScene(); break;
case TEST_TOUCHES:
ChangeOrientation(CCDeviceOrientationLandscapeLeft);
ChangeOrientation(CCDeviceOrientationLandscapeRight);
pScene = new PongScene(); break;
case TEST_MENU:
pScene = new MenuTestScene(); break;
@ -123,6 +120,9 @@ static TestScene* CreateTestScene(int nIdx)
TestController::TestController()
: m_tBeginPos(CCPointZero)
{
// change to default orientation
ChangeOrientation(CCDeviceOrientationPortrait);
// add close menu
CCMenuItemImage *pCloseItem = CCMenuItemImage::itemFromNormalImage(s_pPathClose, s_pPathClose, this, menu_selector(TestController::closeCallback) );
CCMenu* pMenu =CCMenu::menuWithItems(pCloseItem, NULL);