void CreateAllHotspots() { if (_hotspotMinX != null) // hotspots are there already { return; } _hotspotMinX = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 6.0f); _hotspotMinX.StartDistance = _fMinX; _hotspotMinX.Axis = -Vector3F.XAxis; _hotspotMinX.ToolTipText = "Selection Range"; EditorManager.ActiveView.HotSpots.Add(_hotspotMinX); _hotspotMinY = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 6.0f); _hotspotMinY.StartDistance = _fMinY; _hotspotMinY.Axis = -Vector3F.YAxis; _hotspotMinY.ToolTipText = "Selection Range"; EditorManager.ActiveView.HotSpots.Add(_hotspotMinY); _hotspotMaxX = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 6.0f); _hotspotMaxX.StartDistance = _fMaxX; _hotspotMaxX.Axis = Vector3F.XAxis; _hotspotMaxX.ToolTipText = "Selection Range"; EditorManager.ActiveView.HotSpots.Add(_hotspotMaxX); _hotspotMaxY = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 6.0f); _hotspotMaxY.StartDistance = _fMaxY; _hotspotMaxY.Axis = Vector3F.YAxis; _hotspotMaxY.ToolTipText = "Selection Range"; EditorManager.ActiveView.HotSpots.Add(_hotspotMaxY); _hotspotMinX.DisplayScaling = ScaleX; _hotspotMaxX.DisplayScaling = ScaleX; _hotspotMinY.DisplayScaling = ScaleY; _hotspotMaxY.DisplayScaling = ScaleY; _hotspotCopy = new CopySelectionHotspot(this); _hotspotCopy.Set2DOffset(-16.0f, 20.0f); EditorManager.ActiveView.HotSpots.Add(_hotspotCopy); _hotspotPaste = new PasteSelectionHotspot(this); _hotspotPaste.Set2DOffset(-16.0f, 56.0f); EditorManager.ActiveView.HotSpots.Add(_hotspotPaste); _hotspotAdjustSize = new AdjustPasteSizeHotspot(this); _hotspotAdjustSize.Set2DOffset(20.0f, 56.0f); EditorManager.ActiveView.HotSpots.Add(_hotspotAdjustSize); UpdateHotspotVisibility(); }
void RemoveAllHotspots() { SafeRemoveHotSpot(_hotspotMinX); _hotspotMinX = null; SafeRemoveHotSpot(_hotspotMinY); _hotspotMinY = null; SafeRemoveHotSpot(_hotspotMaxX); _hotspotMaxX = null; SafeRemoveHotSpot(_hotspotMaxY); _hotspotMaxY = null; SafeRemoveHotSpot(_hotspotCopy); _hotspotCopy = null; SafeRemoveHotSpot(_hotspotPaste); _hotspotPaste = null; SafeRemoveHotSpot(_hotspotAdjustSize); _hotspotAdjustSize = null; }
void CreateAllHotspots() { if (_hotspotMinX != null) // hotspots are there already return; _hotspotMinX = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 6.0f); _hotspotMinX.StartDistance = _fMinX; _hotspotMinX.Axis = -Vector3F.XAxis; _hotspotMinX.ToolTipText = "Selection Range"; EditorManager.ActiveView.HotSpots.Add(_hotspotMinX); _hotspotMinY = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 6.0f); _hotspotMinY.StartDistance = _fMinY; _hotspotMinY.Axis = -Vector3F.YAxis; _hotspotMinY.ToolTipText = "Selection Range"; EditorManager.ActiveView.HotSpots.Add(_hotspotMinY); _hotspotMaxX = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 6.0f); _hotspotMaxX.StartDistance = _fMaxX; _hotspotMaxX.Axis = Vector3F.XAxis; _hotspotMaxX.ToolTipText = "Selection Range"; EditorManager.ActiveView.HotSpots.Add(_hotspotMaxX); _hotspotMaxY = new HotSpotDistance(this, @"textures\Hotspot_Rect.dds", VisionColors.Yellow, HotSpotBase.PickType.Square, 6.0f); _hotspotMaxY.StartDistance = _fMaxY; _hotspotMaxY.Axis = Vector3F.YAxis; _hotspotMaxY.ToolTipText = "Selection Range"; EditorManager.ActiveView.HotSpots.Add(_hotspotMaxY); _hotspotMinX.DisplayScaling = ScaleX; _hotspotMaxX.DisplayScaling = ScaleX; _hotspotMinY.DisplayScaling = ScaleY; _hotspotMaxY.DisplayScaling = ScaleY; _hotspotCopy = new CopySelectionHotspot(this); _hotspotCopy.Set2DOffset(-16.0f, 20.0f); EditorManager.ActiveView.HotSpots.Add(_hotspotCopy); _hotspotPaste = new PasteSelectionHotspot(this); _hotspotPaste.Set2DOffset(-16.0f, 56.0f); EditorManager.ActiveView.HotSpots.Add(_hotspotPaste); _hotspotAdjustSize = new AdjustPasteSizeHotspot(this); _hotspotAdjustSize.Set2DOffset(20.0f, 56.0f); EditorManager.ActiveView.HotSpots.Add(_hotspotAdjustSize); UpdateHotspotVisibility(); }