当前位置: 首页>>代码示例>>C++>>正文


C++ CCMenuItemFont::getZOrder方法代码示例

本文整理汇总了C++中CCMenuItemFont::getZOrder方法的典型用法代码示例。如果您正苦于以下问题:C++ CCMenuItemFont::getZOrder方法的具体用法?C++ CCMenuItemFont::getZOrder怎么用?C++ CCMenuItemFont::getZOrder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCMenuItemFont的用法示例。


在下文中一共展示了CCMenuItemFont::getZOrder方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: menuCallback

void PerformanceMainLayer::menuCallback(CCObject* pSender)
{
    CCMenuItemFont* pItem = (CCMenuItemFont*)pSender;
    int nIndex = pItem->getZOrder() - kItemTagBasic;

    switch (nIndex)
    {
    case 0:
        runNodeChildrenTest();
        break;
    case 1:
        runParticleTest();
        break;
    case 2:
        runSpriteTest();
        break;
    case 3:
        runTextureTest();
        break;
    case 4:
        runTouchesTest();
        break;
    default:
        break;
    }
}
开发者ID:AfterTheRainOfStars,项目名称:cocos2d-x-qt,代码行数:26,代码来源:PerformanceTest.cpp

示例2: menuCallback

void ExtensionsMainLayer::menuCallback(CCObject* pSender)
{
    CCMenuItemFont* pItem = (CCMenuItemFont*)pSender;
    int nIndex = pItem->getZOrder() - kItemTagBasic;

    switch (nIndex)
    {
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)	// MARMALADE CHANGE: Not yet avaiable on Marmalade
    case TEST_NOTIFICATIONCENTER:
        {
            runNotificationCenterTest();
        }
        break;
#endif
    case TEST_CCCONTROLBUTTON:
        {
            CCControlSceneManager* pManager = CCControlSceneManager::sharedControlSceneManager();
            CCScene* pScene = pManager->currentControlScene();
            CCDirector::sharedDirector()->replaceScene(pScene);
        }
        break;
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)	// MARMALADE CHANGE: Not yet avaiable on Marmalade
    case TEST_COCOSBUILDER:
        {
            TestScene* pScene = new CocosBuilderTestScene();
            if (pScene)
            {
                pScene->runThisTest();
                pScene->release();
            }
        }
        break;
#endif
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)	// MARMALADE CHANGE: Not yet avaiable on Marmalade
    case TEST_HTTPCLIENT:
        {
            runHttpClientTest();
        }
        break;
#endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
    case TEST_EDITBOX:
        {
            runEditBoxTest();
        }
        break;
#endif
	case TEST_TABLEVIEW:
		{
			runTableViewTest();
		}
		break;
    default:
        break;
    }
}
开发者ID:PavolSatala,项目名称:cocos2d-x,代码行数:56,代码来源:ExtensionsTest.cpp

示例3: menuCallback

void CocoStudioGUIMainLayer::menuCallback(CCObject *pSender)
{
    CCMenuItemFont* pItem = static_cast<CCMenuItemFont*>(pSender);
    int nIndex = pItem->getZOrder() - kItemTagBasic;
    
    switch (nIndex)
    {
        case TEST_GUI_WIDGET_DYNAMIC_CREATE:
        {
            CocosGUITestScene *pScene = new CocosGUITestScene();
			pScene->runThisTest();
			pScene->release();
        }
            break;
            
        case TEST_CUSTOM_GUI:
        {
            CustomGUITestScene* pScene = new CustomGUITestScene();
            pScene->runThisTest();
            pScene->release();
        }
            break;
        case TEST_MAC_COCOSTUDIO:
        {
            MacGUIEditorTestScene* pScene = new MacGUIEditorTestScene();
            pScene->runThisTest();
            pScene->release();
            break;
        }
         
//            /*
        case TEST_GUI_WIDGET_CREATE_FROM_EDITOR:
        {
            GUIEditorTestScene* pScene = new GUIEditorTestScene();
            pScene->runThisTest();
            pScene->release();
        }
            break;
//             */
            
        default:
            break;
    }
}
开发者ID:aboduo,项目名称:cocos2dx-classical,代码行数:44,代码来源:CocoStudioGUITest.cpp

示例4: menuCallback

void BugsTestMainLayer::menuCallback(CCObject* pSender)
{
    CCMenuItemFont* pItem = (CCMenuItemFont*)pSender;
    int nIndex = pItem->getZOrder() - kItemTagBasic;

    switch (nIndex)
    {
    case 0:
        TEST_BUG(350);
        break;
    case 1:
        TEST_BUG(422);
        break;
    case 2:
        TEST_BUG(458);
        break;
    case 3:
        TEST_BUG(624);
        break;
    case 4:
        TEST_BUG(886);
        break;
    case 5:
        TEST_BUG(899);
        break;
    case 6:
        TEST_BUG(914);
        break;
    case 7:
        TEST_BUG(1159);
        break;
    case 8:
        TEST_BUG(1174);
        break;
    case 9:
        TEST_BUG(ParticleBufOverflow);
        break;
    default:
        break;
    }
}
开发者ID:ccjimmy,项目名称:TweeJump4wp8,代码行数:41,代码来源:BugsTest.cpp

示例5: menuCallback

void ExtensionsMainLayer::menuCallback(CCObject* pSender)
{
    CCMenuItemFont* pItem = (CCMenuItemFont*)pSender;
    int nIndex = pItem->getZOrder() - kItemTagBasic;

    switch (nIndex)
    {
    case TEST_NOTIFICATIONCENTER:
        {
            runNotificationCenterTest();
        }
        break;
    case TEST_CCCONTROLBUTTON:
        {
            CCControlSceneManager* pManager = CCControlSceneManager::sharedControlSceneManager();
            CCScene* pScene = pManager->currentControlScene();
            CCDirector::sharedDirector()->replaceScene(pScene);
        }
        break;
    case TEST_TEXTUREWATCHER:
        {
            static bool s_bOpened = false;
            s_bOpened = !s_bOpened;
            CCTextureWatcher::sharedTextureWatcher()->setDisplayWatcher(s_bOpened);
        }
        break;
    case TEST_COCOSBUILDER:
        {
            TestScene* pScene = new CocosBuilderTestScene();
            if (pScene)
            {
                pScene->runThisTest();
                pScene->release();
            }
        }
        break;
    default:
        break;
    }
}
开发者ID:haiweizhang,项目名称:MyCocos2d-xV2.0,代码行数:40,代码来源:ExtensionsTest.cpp

示例6: menuCallback

void ExtensionsMainLayer::menuCallback(CCObject* pSender)
{
    CCMenuItemFont* pItem = (CCMenuItemFont*)pSender;
    int nIndex = pItem->getZOrder() - kItemTagBasic;

    switch (nIndex)
    {
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)	// MARMALADE CHANGE: Not yet avaiable on Marmalade
    case TEST_NOTIFICATIONCENTER:
        {
            runNotificationCenterTest();
        }
        break;
#endif
    case TEST_CCCONTROLBUTTON:
        {
            CCControlSceneManager* pManager = CCControlSceneManager::sharedControlSceneManager();
            CCScene* pScene = pManager->currentControlScene();
            CCDirector::sharedDirector()->replaceScene(pScene);
        }
        break;
    case TEST_COCOSBUILDER:
        {
            TestScene* pScene = new CocosBuilderTestScene();
            if (pScene)
            {
                pScene->runThisTest();
                pScene->release();
            }
        }
        break;
#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE && CC_TARGET_PLATFORM != CC_PLATFORM_NACL && CC_TARGET_PLATFORM != CC_PLATFORM_EMSCRIPTEN && CC_TARGET_PLATFORM != CC_PLATFORM_WINRT)
    case TEST_HTTPCLIENT:
        {
            runHttpClientTest();
        }
        break;
#endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)  || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8)
        case TEST_WEBSOCKET:
        {
            runWebSocketTest();
        }
        break;
#endif
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN)  || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
    case TEST_EDITBOX:
        {
            runEditBoxTest();
        }
        break;
#endif
	case TEST_TABLEVIEW:
		{
			runTableViewTest();
		}
		break;
    case TEST_COMPONENTS:
        {
            runComponentsTestLayerTest();
        }
        break;
	case TEST_ARMATURE:
		{
			ArmatureTestScene *pScene = new ArmatureTestScene();
			if (pScene)
			{
				pScene->runThisTest();
				pScene->release();
			}
		}
		break;
    case TEST_SCENEEDITOR:
       {
            SceneEditorTestScene *pScene = new SceneEditorTestScene();
            if (NULL != pScene)
            {
                pScene->runThisTest();
                pScene->release();
            }
       }
            break;
        case TEST_COCOSGUI:
        {
            CocoStudioGUITestScene* pScene = new CocoStudioGUITestScene();
            pScene->runThisTest();
            pScene->release();
		}
            break;
        case TEST_ACTIONTIMELINE:
            {
                TimelineTestScene* pScene = new TimelineTestScene();
                pScene->runThisTest();
                pScene->release();
            }
    default:
        break;
    }
}
开发者ID:bunny1985,项目名称:DigitAdventures,代码行数:99,代码来源:ExtensionsTest.cpp

示例7: menuCallback

void CocosGUITestMainLayer::menuCallback(CCObject* pSender)
{
    UISceneManager* pManager = UISceneManager::sharedUISceneManager();
    CCMenuItemFont* pItem = (CCMenuItemFont*)pSender;
    int nIndex = pItem->getZOrder() - kItemTagBasic;
    
    switch (nIndex)
    {
        case TEST_BUTTON:
            pManager->setCurrentUISceneId(kUIButtonTest);
            pManager->setMinUISceneId(kUIButtonTest);
            pManager->setMaxUISceneId(kUIButtonTest_Title);
            break;
            
        case TEST_CHECKBOX:
        {
            pManager->setCurrentUISceneId(kUICheckBoxTest);
            pManager->setMinUISceneId(kUICheckBoxTest);
            pManager->setMaxUISceneId(kUICheckBoxTest);
        }
            break;
            
        case TEST_SLIDER:
        {
            pManager->setCurrentUISceneId(kUISliderTest);
            pManager->setMinUISceneId(kUISliderTest);
            pManager->setMaxUISceneId(kUISliderTest_Scale9);
        }
            break;
            
            /*
        case TEST_POTENTIOMETER:
        {
            pManager->setCurrentUISceneId(kUIPotentiometerTest);
            pManager->setMinUISceneId(kUIPotentiometerTest);
            pManager->setMaxUISceneId(kUIPotentiometerTest);
        }
            break;
            
        case TEST_SWITCH:
        {
            pManager->setCurrentUISceneId(kUISwitchTest_Horizontal);
            pManager->setMinUISceneId(kUISwitchTest_Horizontal);
            pManager->setMaxUISceneId(kUISwitchTest_VerticalAndTitleVertical);
        }
            break;
             */
            
        case TEST_IMAGEVIEW:
        {
            pManager->setCurrentUISceneId(kUIImageViewTest);
            pManager->setMinUISceneId(kUIImageViewTest);
            pManager->setMaxUISceneId(kUIImageViewTest_Scale9);
        }
            break;
            
        case TEST_LOADINGBAR:
        {
            pManager->setCurrentUISceneId(kUILoadingBarTest_Left);
            pManager->setMinUISceneId(kUILoadingBarTest_Left);
            pManager->setMaxUISceneId(kUILoadingBarTest_Right_Scale9);
        }
            break;
            
            /*
        case TEST_PROGRESSTIMER:
        {
            pManager->setCurrentUISceneId(kUIProgressTimerTest_Radial);
            pManager->setMinUISceneId(kUIProgressTimerTest_Radial);
            pManager->setMaxUISceneId(kUIProgressTimerTest_WithSpriteFrame);
        }
            break;
             */
            
        case TEST_LABELATLAS:
        {
            pManager->setCurrentUISceneId(kUILabelAtlasTest);
            pManager->setMinUISceneId(kUILabelAtlasTest);
            pManager->setMaxUISceneId(kUILabelAtlasTest);
        }
            break;
            
        case TEST_LABEL:
        {
            pManager->setCurrentUISceneId(kUILabelTest);
            pManager->setMinUISceneId(kUILabelTest);
            pManager->setMaxUISceneId(kUILabelTest_TTF);
        }
            break;
            
        case TEST_LABELBMFONT:
        {
            pManager->setCurrentUISceneId(kUILabelBMFontTest);
            pManager->setMinUISceneId(kUILabelBMFontTest);
            pManager->setMaxUISceneId(kUILabelBMFontTest);
        }
            break;
            
        case TEST_TEXTFIELD:
        {
//.........这里部分代码省略.........
开发者ID:1901,项目名称:cocos2d-x,代码行数:101,代码来源:CocosGUIScene.cpp

示例8: menuCallback

void GUIEditorMainLayer::menuCallback(CCObject* pSender)
{
    UISceneManager_Editor* pManager = UISceneManager_Editor::sharedUISceneManager_Editor();
    CCMenuItemFont* pItem = (CCMenuItemFont*)pSender;
    int nIndex = pItem->getZOrder() - kItemTagBasic;
    
    switch (nIndex)
    {
        case TEST_BUTTON_EDITOR:
            pManager->setCurrentUISceneId(kUIButtonTest_Editor);
            pManager->setMinUISceneId(kUIButtonTest_Editor);
            pManager->setMaxUISceneId(kUIButtonTest_Editor);
            break;
            
            
        case TEST_CHECKBOX_EDITOR:
        {
            pManager->setCurrentUISceneId(kUICheckBoxTest_Editor);
            pManager->setMinUISceneId(kUICheckBoxTest_Editor);
            pManager->setMaxUISceneId(kUICheckBoxTest_Editor);
        }
            break;
            
        case TEST_SLIDER_EDITOR:
        {
            pManager->setCurrentUISceneId(kUISliderTest_Editor);
            pManager->setMinUISceneId(kUISliderTest_Editor);
            pManager->setMaxUISceneId(kUISliderTest_Editor);
        }
            break;
            
            /*
            //
//             case TEST_POTENTIOMETER:
//             {
//             pManager->setCurrentUISceneId(kUIPotentiometerTest);
//             pManager->setMinUISceneId(kUIPotentiometerTest);
//             pManager->setMaxUISceneId(kUIPotentiometerTest);
//             }
//             break;
//             
//             case TEST_SWITCH:
//             {
//             pManager->setCurrentUISceneId(kUISwitchTest_Horizontal);
//             pManager->setMinUISceneId(kUISwitchTest_Horizontal);
//             pManager->setMaxUISceneId(kUISwitchTest_VerticalAndTitleVertical);
//             }
//             break;
             //
             */
            
        case TEST_IMAGEVIEW_EDITOR:
        {
            pManager->setCurrentUISceneId(kUIImageViewTest_Editor);
            pManager->setMinUISceneId(kUIImageViewTest_Editor);
            pManager->setMaxUISceneId(kUIImageViewTest_Editor);
        }
            break;
            
        case TEST_LOADINGBAR_EDITOR:
        {
            pManager->setCurrentUISceneId(kUILoadingBarTest_Editor);
            pManager->setMinUISceneId(kUILoadingBarTest_Editor);
            pManager->setMaxUISceneId(kUILoadingBarTest_Editor);
        }
            break;
            
            
            //
//             case TEST_PROGRESSTIMER:
//             {
//             pManager->setCurrentUISceneId(kUIProgressTimerTest_Radial);
//             pManager->setMinUISceneId(kUIProgressTimerTest_Radial);
//             pManager->setMaxUISceneId(kUIProgressTimerTest_WithSpriteFrame);
//             }
//             break;
             //
            
        case TEST_LABELATLAS_EDITOR:
        {
            pManager->setCurrentUISceneId(kUILabelAtlasTest_Editor);
            pManager->setMinUISceneId(kUILabelAtlasTest_Editor);
            pManager->setMaxUISceneId(kUILabelAtlasTest_Editor);
        }
            break;
            
            
        case TEST_LABEL_EDITOR:
        {
            pManager->setCurrentUISceneId(kUILabelTest_Editor);
            pManager->setMinUISceneId(kUILabelTest_Editor);
            pManager->setMaxUISceneId(kUILabelTest_Editor);
        }
            break;
            
        case TEST_LABELBMFONT_EDITOR:
        {
            pManager->setCurrentUISceneId(kUILabelBMFontTest_Editor);
            pManager->setMinUISceneId(kUILabelBMFontTest_Editor);
            pManager->setMaxUISceneId(kUILabelBMFontTest_Editor);
//.........这里部分代码省略.........
开发者ID:1901,项目名称:cocos2d-x,代码行数:101,代码来源:GUIEditorTest.cpp


注:本文中的CCMenuItemFont::getZOrder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。