public static void NukeOverlayElement(OverlayElement element) { var container = element as OverlayContainer; if (container != null) { var toDelete = new List <OverlayElement>(); //Ogre::OverlayContainer::ChildIterator children = container->getChildIterator(); //while (children.hasMoreElements()) //{ // toDelete.push_back(children.getNext()); //} //for (int i = 0; i < toDelete.Count; i++) //{ // NukeOverlayElement(toDelete[i]); //} } if (element != null) { OverlayContainer parent = element.Parent; if (parent != null) { parent.RemoveChild(element.Name); } OverlayManager.Singleton.DestroyOverlayElement(element); } }
public override void Exit() { UIManager.Instance.HideCursor(); editor.Dispose(); OverlayContainer.ChildIterator children = editorPanel.GetChildIterator(); while (children.MoveNext()) { OverlayElement currentElement = children.Current; editorPanel.RemoveChild(currentElement.Name); } UIManager.Instance.DestroyWidget(btnAddObject); UIManager.Instance.DestroyWidget(btnAIMeshCreateLine); UIManager.Instance.DestroyWidget(btnAIMeshCreateVertex); UIManager.Instance.DestroyWidget(btnClose); UIManager.Instance.DestroyWidget(btnSave); UIManager.Instance.DestroyWidget(lbAIMesh); UIManager.Instance.DestroyWidget(lbGeneral); UIManager.Instance.DestroyWidget(lbObjects); UIManager.Instance.DestroyWidget(lsvObjects); Widget.NukeOverlayElement(horline); Widget.NukeOverlayElement(horline2); UIManager.Instance.GetTraysLayer().Remove2D(editorPanel); Widget.NukeOverlayElement(editorPanel); }
public override void DestroyWidget() { removeAndDestroyAllChildWidgets(); mItems.Clear(); mChildLists.Clear(); // TODO: Ver si esto está bien OverlayManager om = OverlayManager.Singleton; mHighlightContainer.RemoveChild(mHighlightPanel.Name); om.DestroyOverlayElement(mHighlightPanel); mHighlightPanel = null; mChildrenContainer.RemoveChild(mHighlightContainer.Name); om.DestroyOverlayElement(mHighlightContainer); mHighlightContainer = null; base.DestroyWidget(); }
public void RemoveText(Text text) { _OverlayPanel.RemoveChild(text._TextArea.Name); OverlayManager.Singleton.DestroyOverlayElement(text._TextArea.Name); }