Esempio n. 1
0
void Menu::killDialogueOverlayLines()
{
  Ogre::OverlayManager* om = Ogre::OverlayManager::getSingletonPtr();
  /*If overlay manager is NULL, then it is not present any more and all overlays
    should already be destroyed at that point. So we can return anyway. */
  if (om==NULL) return;
  Ogre::OverlayContainer* oc = static_cast<Ogre::OverlayContainer*> (om->getOverlayElement(cDialogueOverlay+"/Box"));
  unsigned int i;
  for (i=0; i<m_DialogueLineCount; i=i+1)
  {
    oc->removeChild(cDialogueOverlay+"/Box/Line"+IntToString(i));
    om->destroyOverlayElement(cDialogueOverlay+"/Box/Line"+IntToString(i));
  }//for
  m_DialogueLineCount = 0;
}
Esempio n. 2
0
YZ::GuiIcon::~GuiIcon(void) {
    LOG_FUNCTION
    Ogre::OverlayContainer* c = this->icon->getParent();
    c->removeChild(this->icon->getName());
    Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->icon);
}