Example #1
0
        public override void Dispose()
        {
            Disable();
            foreach (var pair in buildingTypes)
            {
                pair.Key.Toggled -= OnBuildingTypeToggled;
                ui.SelectionBar.RemoveChild(pair.Key);
            }

            checkBoxes.Dispose();
            buildingTypes = null;
        }
Example #2
0
        public override void Dispose()
        {
            Disable();
            foreach (var pair in spawners)
            {
                ui.SelectionBar.RemoveChild(pair.Key);
            }

            checkBoxes.SelectedChanged -= OnSelectedChanged;
            checkBoxes.Dispose();
            uiElem.Dispose();
            spawners = null;
        }
Example #3
0
        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();
        }
Example #4
0
        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();
        }
Example #5
0
        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();
        }