本文整理汇总了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;
}
示例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->
}
示例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;
}