public override void OnExit(GameTime gameTime) { KeyboardEventDispatcher.OnKeyPressed -= OnKeyPressed; foreach (var button in buttons) { button.OnButtonPress -= MenuScreen_OnButtonPress; button.OnMouseEntry -= MenuScreen_OnMouseEntry; button.Dispose(); } btnUp.Dispose(); btnDown.Dispose(); buttons = null; foreach (var bt in buttonsText) { bt.Dispose(); } buttonsText = null; foreach (var t in tPanels) { t.Dispose(); } tPanels = null; wr.Dispose(); seHover.Dispose(); }
public override void Destroy(GameTime gameTime) { wBackPanel.Dispose(); sP.Dispose(); sS.Dispose(); sT.Dispose(); wr.Dispose(); }
public override void OnExit(GameTime gameTime) { KeyboardEventDispatcher.OnKeyPressed -= KeyboardEventDispatcher_OnKeyPressed; bFinish.OnButtonPress -= bFinish_OnButtonPress; tInput.OnTextChanged -= tInput_OnTextChanged; tInput.Dispose(); wr.Dispose(); txtLogin.Dispose(); wUsername.Dispose(); bFinish.Dispose(); }
public override void OnExit(GameTime gameTime) { if (wr != null) { button.Dispose(); text.Dispose(); wr.Dispose(); wr = null; } font = null; tLoad.Dispose(); tPixel.Dispose(); }
public void Dispose() { wrButtonPanel.Dispose(); wrMain.Dispose(); Minimap.Dispose(); TeamDataPanel.Dispose(); SelectionPanel.Dispose(); UnitDataPanel.Dispose(); BuildingDataPanel.Dispose(); if (BuildingPanel != null) { BuildingPanel.Dispose(); } }
public override void OnExit(GameTime gameTime) { MouseEventDispatcher.OnMousePress -= OnMP; DevConsole.OnNewCommand -= DevConsole_OnNewCommand; KeyboardEventDispatcher.OnKeyPressed -= OnKeyPressed; DevConsole.Deactivate(); if (game.LoadScreen.LoadFile == null) { BuildELDFromWidgets(); game.LoadScreen.LoadData = eld; } menuPresets.Dispose(); foreach (var w in widgets) { w.Dispose(); } wr.Dispose(); // Clear Init Info schemes.Clear(); schemes = null; }