コード例 #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;
        }
コード例 #2
0
ファイル: SpawnerTool.cs プロジェクト: MK4H/MHUrho
        public override void Dispose()
        {
            Disable();
            foreach (var pair in spawners)
            {
                ui.SelectionBar.RemoveChild(pair.Key);
            }

            checkBoxes.SelectedChanged -= OnSelectedChanged;
            checkBoxes.Dispose();
            uiElem.Dispose();
            spawners = null;
        }
コード例 #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();
        }
コード例 #4
0
ファイル: TileTypeTool.cs プロジェクト: MK4H/MHUrho
        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();
        }
コード例 #5
0
ファイル: TerrainManipulatorTool.cs プロジェクト: MK4H/MHUrho
        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();
        }