mirror of https://github.com/axmolengine/axmol.git
update controller.cpp to ver 701
This commit is contained in:
parent
0298500abe
commit
ee52774bda
|
@ -5,12 +5,6 @@
|
|||
#define LINE_SPACE 40
|
||||
|
||||
static int s_nPageIndex = 0;
|
||||
static cocos2d::ccDeviceOrientation s_eDefaultOrientation = kCCDeviceOrientationLandscapeLeft;
|
||||
|
||||
void TestController::setDefaultDeviceOrientation(cocos2d::ccDeviceOrientation eOrientation)
|
||||
{
|
||||
s_eDefaultOrientation = eOrientation;
|
||||
}
|
||||
|
||||
static TestScene* CreateTestScene(int nIdx)
|
||||
{
|
||||
|
@ -41,7 +35,7 @@ static TestScene* CreateTestScene(int nIdx)
|
|||
case TEST_COCOSNODE:
|
||||
pScene = new CocosNodeTestScene(); break;
|
||||
case TEST_TOUCHES:
|
||||
CCDirector::getSharedDirector()->setDeviceOrientation(kCCDeviceOrientationPortrait);
|
||||
CCDirector::getSharedDirector()->setDeviceOrientation(CCDeviceOrientationPortrait);
|
||||
pScene = new PongScene(); break;
|
||||
case TEST_MENU:
|
||||
pScene = new MenuTestScene(); break;
|
||||
|
@ -58,7 +52,7 @@ static TestScene* CreateTestScene(int nIdx)
|
|||
case TEST_INTERVAL:
|
||||
pScene = new IntervalTestScene(); break;
|
||||
case TEST_CHIPMUNK:
|
||||
CCDirector::getSharedDirector()->setDeviceOrientation(kCCDeviceOrientationPortrait);
|
||||
CCDirector::getSharedDirector()->setDeviceOrientation(CCDeviceOrientationPortrait);
|
||||
pScene = new ChipmunkTestScene(); break;
|
||||
case TEST_ATLAS:
|
||||
pScene = new AtlasTestScene(); break;
|
||||
|
@ -85,7 +79,7 @@ static TestScene* CreateTestScene(int nIdx)
|
|||
|
||||
TestController::TestController()
|
||||
{
|
||||
CCDirector::getSharedDirector()->setDeviceOrientation(s_eDefaultOrientation);
|
||||
CCDirector::getSharedDirector()->setDeviceOrientation(CCDeviceOrientationLandscapeLeft);
|
||||
|
||||
// add close menu
|
||||
CCMenuItemImage *pCloseItem = CCMenuItemImage::itemFromNormalImage(s_pPathClose, s_pPathClose, this, menu_selector(TestController::closeCallback) );
|
||||
|
|
|
@ -21,11 +21,10 @@ public:
|
|||
|
||||
void updateItemsText();
|
||||
|
||||
static void setDefaultDeviceOrientation(cocos2d::ccDeviceOrientation eOrientation);
|
||||
|
||||
private:
|
||||
CCMenuItemLabel * m_pMenuItems[ITEM_EVERYPAGE];
|
||||
unsigned int m_nUIDs[ITEM_EVERYPAGE];
|
||||
CCMenuItemLabel * m_pMenuItems[ITEM_EVERYPAGE];
|
||||
|
||||
unsigned int m_nUIDs[ITEM_EVERYPAGE];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue