public void Close() { if (mChildPerishableListBox != null && mChildPerishableListBox.Visible) { GuiManager.RemoveWindow(mChildPerishableListBox); } }
public virtual void Destroy() { // Generated Destroy SpriteManager.RemovePositionedObject(this); GuiManager.RemoveWindow(this); if (VictoryTextLabel != null) { VictoryTextLabel.Destroy(); VictoryTextLabel.Detach(); } if (PlayAgainText != null) { PlayAgainText.Destroy(); PlayAgainText.Detach(); } if (NoButton != null) { NoButton.Destroy(); NoButton.Detach(); } if (YesButton != null) { YesButton.Destroy(); YesButton.Detach(); } if (BackgroundSprite != null) { SpriteManager.RemoveSprite(BackgroundSprite); } CustomDestroy(); }
private void RemovalOfWatchedWindow(Window callingWindow) { IObjectDisplayer asObjectDisplayer = callingWindow as IObjectDisplayer; GuiManager.RemoveWindow(callingWindow); if (asObjectDisplayer.ObjectDisplayingAsObject != null && mObjectDisplayers.ContainsKey(asObjectDisplayer.ObjectDisplayingAsObject)) { mObjectDisplayers.Remove(asObjectDisplayer.ObjectDisplayingAsObject); } else { // We still need to see if this Window is contained in this dictionary even // if the previous if statement fails. The reason for this is because of value // and immutable types. For example, a String PropertyGrid might open up for the // value "". Afterwards, the user changes the value and then double-clicks a list // to open a new PropertyGrid. Since the string has changed, then asObjectDisplayer.ObjectDisplayingAsObject // will no longer equal the "" string so the Window will never be removed when it should be. object keyToRemove = null; foreach (KeyValuePair <object, IObjectDisplayer> kvp in mObjectDisplayers) { if (kvp.Value == asObjectDisplayer) { keyToRemove = kvp.Key; break; } } if (keyToRemove != null) { mObjectDisplayers.Remove(keyToRemove); } } if (mWindowFamilies.ContainsValue(asObjectDisplayer)) { // Remove the object by its value IObjectDisplayer keyToRemove = null; foreach (KeyValuePair <IObjectDisplayer, IObjectDisplayer> kvp in mWindowFamilies) { if (kvp.Value == asObjectDisplayer) { keyToRemove = kvp.Key; break; } } if (keyToRemove != null) { mWindowFamilies.Remove(keyToRemove); } } }
public virtual void RemoveFromManagers() { SpriteManager.ConvertToManuallyUpdated(this); GuiManager.RemoveWindow(this); if (LabelText != null) { TextManager.RemoveTextOneWay(LabelText); } }
public virtual void RemoveFromManagers() { SpriteManager.ConvertToManuallyUpdated(this); GuiManager.RemoveWindow(this); if (PlayerSprite != null) { SpriteManager.RemoveSpriteOneWay(PlayerSprite); } }
public virtual void RemoveFromManagers() { SpriteManager.ConvertToManuallyUpdated(this); GuiManager.RemoveWindow(this); VictoryTextLabel.RemoveFromManagers(); PlayAgainText.RemoveFromManagers(); NoButton.RemoveFromManagers(); YesButton.RemoveFromManagers(); if (BackgroundSprite != null) { SpriteManager.RemoveSpriteOneWay(BackgroundSprite); } }
public virtual void RemoveFromManagers() { SpriteManager.ConvertToManuallyUpdated(this); GuiManager.RemoveWindow(this); if (IconSprite != null) { SpriteManager.RemoveSpriteOneWay(IconSprite); } if (HighlightSprite != null) { SpriteManager.RemoveSpriteOneWay(HighlightSprite); } }
public virtual void Destroy() { // Generated Destroy SpriteManager.RemovePositionedObject(this); GuiManager.RemoveWindow(this); if (LabelText != null) { TextManager.RemoveText(LabelText); } CustomDestroy(); }
public virtual void Destroy() { // Generated Destroy SpriteManager.RemovePositionedObject(this); GuiManager.RemoveWindow(this); if (PlayerSprite != null) { SpriteManager.RemoveSprite(PlayerSprite); } CustomDestroy(); }
void ListBoxClick(Window callingWindow) { if (((ListBox)callingWindow).HighlightedCount != 0) { MenuItem selectedMenuItem = ((ListBox)callingWindow).GetHighlightedObject()[0] as MenuItem; if (selectedMenuItem != null) { selectedMenuItem.OnClick(); } if (selectedMenuItem.MenuItems.Count == 0) { GuiManager.RemoveWindow(callingWindow); } } }
void OnListBoxClicked(Window callingWindow) { mSelectionDisplay.Text = ""; List <string> a = ((ListBox)callingWindow).GetHighlighted(); if (a.Count != 0) { mPreviousSelectedObject = SelectedObject; mSelectionDisplay.Text = a[0]; this.SelectedObject = ((ListBox)callingWindow).GetHighlightedObject()[0]; } if (ItemClick != null) { ItemClick(this); } GuiManager.RemoveWindow(callingWindow, true); callingWindow.Visible = false; }
private void DestroyScrollBar() { GuiManager.RemoveWindow(mScrollBar); mScrollBar = null; }
void RemoveThis(Window callingWindow) { this.CloseWindow(); GuiManager.RemoveWindow(this); }