public override void Dispose() { Disable(); foreach (var pair in buildingTypes) { pair.Key.Toggled -= OnBuildingTypeToggled; ui.SelectionBar.RemoveChild(pair.Key); } checkBoxes.Dispose(); buildingTypes = null; }
public override void Dispose() { Disable(); foreach (var pair in spawners) { ui.SelectionBar.RemoveChild(pair.Key); } checkBoxes.SelectedChanged -= OnSelectedChanged; checkBoxes.Dispose(); uiElem.Dispose(); spawners = null; }
public override void Dispose() { //ALT: Maybe don't disable, or change implementation of disable to not delete currently visible buttons Disable(); foreach (var pair in unitTypes) { pair.Key.Toggled -= OnUnitTypeToggled; ui.SelectionBar.RemoveChild(pair.Key); } unitTypes = null; checkBoxes.Dispose(); }
public override void Dispose() { //ALT: Maybe don't disable, or change implementation of disable to not delete currently visible buttons Disable(); foreach (var pair in tileTypes) { pair.Key.Toggled -= OnTileTypeToggled; ui.SelectionBar.RemoveChild(pair.Key); } tileTypes = null; highlight.Dispose(); checkBoxes.Dispose(); sizeSlider.Dispose(); uiElem.Dispose(); }
public override void Dispose() { Disable(); foreach (var pair in manipulators) { ui.SelectionBar.RemoveChild(pair.Key); pair.Value.Dispose(); } checkBoxes.SelectedChanged -= OnToggled; checkBoxes.Dispose(); manipulator?.Dispose(); }