mirror of https://github.com/axmolengine/axmol.git
Merge pull request #266 from natural-law/master
Modify the test code for the right device orientation.
This commit is contained in:
commit
52305461c5
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue