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


C++ OverlayElement::hide方法代码示例

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


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

示例1: createTextArea

    //-----------------------------------------------------------------------
    OverlayElement* Profiler::createTextArea(const String& name, Real width, Real height, Real top, Real left, 
                                         uint fontSize, const String& caption, bool show) {


        OverlayElement* textArea = 
			OverlayManager::getSingleton().createOverlayElement("TextArea", name);
        textArea->setMetricsMode(GMM_PIXELS);
        textArea->setWidth(width);
        textArea->setHeight(height);
        textArea->setTop(top);
        textArea->setLeft(left);
        textArea->setParameter("font_name", "BlueHighway");
        textArea->setParameter("char_height", StringConverter::toString(fontSize));
        textArea->setCaption(caption);
        textArea->setParameter("colour_top", "1 1 1");
        textArea->setParameter("colour_bottom", "1 1 1");

        if (show) {
            textArea->show();
        }
        else {
            textArea->hide();
        }

        return textArea;

    }
开发者ID:Anti-Mage,项目名称:ogre,代码行数:28,代码来源:OgreProfiler.cpp

示例2: updateStats

	void DebugText::updateStats(Ogre::String text)
	{
		static String currFps = "Current FPS: ";
		//static String avgFps = "Average FPS: ";
		//static String bestFps = "Best FPS: ";
		//static String worstFps = "Worst FPS: ";
		//static String tris = "Triangle Count: ";

		// update stats when necessary
		OverlayElement* guiAvg = OverlayManager::getSingleton().getOverlayElement("Core/AverageFps");
		OverlayElement* guiCurr = OverlayManager::getSingleton().getOverlayElement("Core/CurrFps");
		OverlayElement* guiBest = OverlayManager::getSingleton().getOverlayElement("Core/BestFps");
		OverlayElement* guiWorst = OverlayManager::getSingleton().getOverlayElement("Core/WorstFps");
		
		guiAvg->hide();
		//guiCurr->hide();
		guiBest->hide();
		guiWorst->hide();

		//OverlayElement* guiWorst = OverlayManager::getSingleton().getOverlayElement("Core/WorstFps");

		/*guiAvg->setCaption(avgFps + StringConverter::toString(mWindow->getAverageFPS()));*/
		guiCurr->setCaption(currFps + StringConverter::toString(mWindow->getLastFPS()));
		//guiBest->setCaption(bestFps + StringConverter::toString(mWindow->getBestFPS())
		//	+" "+StringConverter::toString(mWindow->getBestFrameTime())+" ms");
		//guiWorst->setCaption(worstFps + StringConverter::toString(mWindow->getWorstFPS())
		//	+" "+StringConverter::toString(mWindow->getWorstFrameTime())+" ms");

		//OverlayElement* guiTris = OverlayManager::getSingleton().getOverlayElement("Core/NumTris");
		//guiTris->setCaption(tris + StringConverter::toString(mWindow->getTriangleCount()));

		OverlayElement* guiDbg = OverlayManager::getSingleton().getOverlayElement("Core/DebugText");
		guiDbg->setCaption(text);
		//guiDbg->setPosition(0,0);

		
		//mDebugOverlay->

	}
开发者ID:alexribek,项目名称:apeengine2,代码行数:39,代码来源:DebugText.cpp

示例3: createPanel

    //-----------------------------------------------------------------------
    OverlayElement* OverlayProfileSessionListener::createPanel(const String& name, Real width, Real height, Real top, Real left, 
                                      const String& materialName, bool show)
    {
        OverlayElement* panel = 
            OverlayManager::getSingleton().createOverlayElement("Panel", name);
        panel->setMetricsMode(GMM_PIXELS);
        panel->setWidth(width);
        panel->setHeight(height);
        panel->setTop(top);
        panel->setLeft(left);
        panel->setMaterialName(materialName);

        if (show) {
            panel->show();
        }
        else {
            panel->hide();
        }

        return panel;
    }
开发者ID:LiberatorUSA,项目名称:GUCEF,代码行数:22,代码来源:OgreOverlayProfileSessionListener.cpp


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