本文整理汇总了C++中OverlayContainer::setParameter方法的典型用法代码示例。如果您正苦于以下问题:C++ OverlayContainer::setParameter方法的具体用法?C++ OverlayContainer::setParameter怎么用?C++ OverlayContainer::setParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OverlayContainer
的用法示例。
在下文中一共展示了OverlayContainer::setParameter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createOverlay
OverlayContainer* MenuSheet::createOverlay(int id, const std::string& text, int x, int y, int w, int h) {
std::string ovname = mName + "/" + Ogre::StringConverter::toString(id);
OverlayContainer* ov;
if (text.empty())
ov = static_cast<OverlayContainer*>(OverlayManager::getSingleton().createOverlayElement("Panel", ovname));
else
ov = static_cast<OverlayContainer*>(OverlayManager::getSingleton().createOverlayElement("TextArea", ovname));
ov->setMetricsMode(GMM_PIXELS);
// text area centered around X point, so we create it with w/2 surplus
if (text.empty())
ov->setPosition(x, y);
else
ov->setPosition(x + w/2, y);
ov->setDimensions(w, h);
ov->setCaption(text);
ov->setParameter("font_name", mFont);
ov->setParameter("char_height", StringConverter::toString(mFontSize));
ov->setParameter("alignment", "center");
ov->show();
mOverlay->add2D(ov);
return ov;
}
示例2: createContainer
//-----------------------------------------------------------------------
OverlayContainer* Profiler::createContainer() {
OverlayContainer* container = (OverlayContainer*)
OverlayManager::getSingleton().createOverlayElement(
"BorderPanel", "profiler");
container->setMetricsMode(GMM_PIXELS);
container->setMaterialName("Core/StatsBlockCenter");
container->setHeight(mGuiHeight);
container->setWidth(mGuiWidth * 2 + 15);
container->setParameter("border_size", "1 1 1 1");
container->setParameter("border_material", "Core/StatsBlockBorder");
container->setParameter("border_topleft_uv", "0.0000 1.0000 0.0039 0.9961");
container->setParameter("border_top_uv", "0.0039 1.0000 0.9961 0.9961");
container->setParameter("border_topright_uv", "0.9961 1.0000 1.0000 0.9961");
container->setParameter("border_left_uv","0.0000 0.9961 0.0039 0.0039");
container->setParameter("border_right_uv","0.9961 0.9961 1.0000 0.0039");
container->setParameter("border_bottomleft_uv","0.0000 0.0039 0.0039 0.0000");
container->setParameter("border_bottom_uv","0.0039 0.0039 0.9961 0.0000");
container->setParameter("border_bottomright_uv","0.9961 0.0039 1.0000 0.0000");
container->setLeft(5);
container->setTop(5);
return container;
}