Modify the test code for the right device orientation.

This commit is contained in:
natural-law 2011-05-12 10:11:58 +08:00
parent 78d49e9806
commit a7db186d06
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);