// Engaging public override void OnEngage() { base.OnEngage(); if (BuilderPlug.Me.SlopeDataSector == null || BuilderPlug.Me.SlopeDataSector.IsDisposed) { SlopeDataSectorDialog sdsd = new SlopeDataSectorDialog(); DialogResult dr = sdsd.ShowDialog(); if (dr == DialogResult.Cancel) { General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name); } if (dr == DialogResult.OK) { BuilderPlug.Me.SlopeDataSector = General.Map.Map.GetSelectedSectors(true).ToList()[0]; BuilderPlug.Me.StoreSlopeVertexGroupsInSector(); } } EnableAutoPanning(); renderer.SetPresentation(Presentation.Standard); // Convert geometry selection to sectors only General.Map.Map.ConvertSelection(SelectionType.Sectors); General.Interface.AddButton(BuilderPlug.Me.MenusForm.FloorSlope); General.Interface.AddButton(BuilderPlug.Me.MenusForm.CeilingSlope); General.Interface.AddButton(BuilderPlug.Me.MenusForm.FloorAndCeilingSlope); BuilderPlug.Me.MenusForm.FloorSlope.Checked = false; BuilderPlug.Me.MenusForm.CeilingSlope.Checked = false; BuilderPlug.Me.MenusForm.FloorAndCeilingSlope.Checked = false; if (slopedrawingmode == SlopeDrawingMode.Floor) { BuilderPlug.Me.MenusForm.FloorSlope.Checked = true; } else if (slopedrawingmode == SlopeDrawingMode.Ceiling) { BuilderPlug.Me.MenusForm.CeilingSlope.Checked = true; } else { BuilderPlug.Me.MenusForm.FloorAndCeilingSlope.Checked = true; } // Make text labels for sectors SetupLabels(); updateOverlaySurfaces(); Update(); // Set cursor General.Interface.SetCursor(Cursors.Cross); }
// Mode engages public override void OnEngage() { base.OnEngage(); if (BuilderPlug.Me.SlopeDataSector == null || BuilderPlug.Me.SlopeDataSector.IsDisposed) { SlopeDataSectorDialog sdsd = new SlopeDataSectorDialog(); DialogResult dr = sdsd.ShowDialog(); if (dr == DialogResult.Cancel) { General.Editing.ChangeMode(General.Editing.PreviousStableMode.Name); } if (dr == DialogResult.OK) { BuilderPlug.Me.SlopeDataSector = General.Map.Map.GetSelectedSectors(true).ToList()[0]; BuilderPlug.Me.StoreSlopeVertexGroupsInSector(); } } renderer.SetPresentation(Presentation.Things); General.Interface.AddButton(BuilderPlug.Me.MenusForm.UpdateSlopes); // Convert geometry selection to sectors General.Map.Map.ConvertSelection(SelectionType.Sectors); // Get all 3D floors in the map threedfloors = BuilderPlug.GetThreeDFloors(General.Map.Map.Sectors.ToList()); SetupLabels(); foreach (SlopeVertexGroup svg in BuilderPlug.Me.SlopeVertexGroups) { svg.FindSectors(); } // Update overlay surfaces, so that selected sectors are drawn correctly updateOverlaySurfaces(); }