本文整理汇总了C++中OverlayContainer::hide方法的典型用法代码示例。如果您正苦于以下问题:C++ OverlayContainer::hide方法的具体用法?C++ OverlayContainer::hide怎么用?C++ OverlayContainer::hide使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OverlayContainer
的用法示例。
在下文中一共展示了OverlayContainer::hide方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mListener
// -------------------------------------------------------------------------
OgreBulletGuiListener::OgreBulletGuiListener(OgreBulletListener *listener, Ogre::RenderWindow *win) :
mListener(listener),
mWindow(win),
mMouseOverlay(0),
mMousePanel(0)
{
/******************* CREATE Cursor Overlay ***************************/
mMouseOverlay = (Overlay*)OverlayManager::getSingleton().getByName("GuiOverlay");
if (mMouseOverlay)
{
mMousePanel = OverlayManager::getSingleton().getOverlayElement ("GUIMouse");
}
else
{
mMouseOverlay = OverlayManager::getSingletonPtr()->create("GuiOverlay");
mMouseOverlay->setZOrder(600);
mMousePanel = (Ogre::OverlayElement *)
OverlayManager::getSingletonPtr()->createOverlayElement("Panel", "GUIMouse");
mMousePanel->setMaterialName("OgreBulletDemos/TargetSights");
TexturePtr mouseTex = TextureManager::getSingleton().load("target.png", "Bullet");
mMousePanel->setWidth (mouseTex->getWidth() / (float)win->getWidth());
mMousePanel->setHeight (mouseTex->getHeight() / (float)win->getHeight());
Ogre::OverlayContainer *mouseContainer = (Ogre::OverlayContainer*)
OverlayManager::getSingletonPtr()->createOverlayElement("Panel", "GUIContainer");
mMouseOverlay->add2D(mouseContainer);
mouseContainer->addChild(mMousePanel);
}
mMouseOverlay->show();
TexturePtr mouseTex = TextureManager::getSingleton().load("target.png", "Bullet");
mMouseCursorHalfWidth = (Real(mouseTex->getWidth()) / mWindow->getWidth()) * 0.5;
mMouseCursorHalfHeight = (Real(mouseTex->getHeight()) / mWindow->getHeight ()) * 0.5;
/******************* CREATE GUI ***************************/
mGui = new BetaGUI::GUI("OgreBulletGui", "BlueHighway", 14, win);
OverlayContainer* mouseCursor = mGui->createMousePointer(Vector2(32, 32), "bgui.pointer");
mouseCursor->hide();
mGui->injectMouse(mWindow->getWidth() * 0.5, mWindow->getHeight() * 0.5, false);
}