Example #1
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspot again:
            SafeRemoveHotSpot(_hotSpotStartEvent); _hotSpotStartEvent = null;

            base.OnUnSelected();
        }
Example #2
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspots again:
            SafeRemoveHotSpot(_hotSpotVolume); _hotSpotVolume       = null;
            SafeRemoveHotSpot(_hotSpotFadeMin); _hotSpotFadeMin     = null;
            SafeRemoveHotSpot(_hotSpotFadeMax); _hotSpotFadeMax     = null;
            SafeRemoveHotSpot(_hotSpotPlaySound); _hotSpotPlaySound = null;
            SafeRemoveHotSpot(_hotSpotOuterCone); _hotSpotOuterCone = null;
            SafeRemoveHotSpot(_hotSpotInnerCone); _hotSpotInnerCone = null;

            base.OnUnSelected();
        }
Example #3
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected();

            System.Diagnostics.Debug.Assert(_hotSpotVolume == null);

            // hotspot for sound volume
            _hotSpotVolume = new HotSpotDistance(this, @"textures\Hotspot_V.tga", VisionColors.Cyan, HotSpotBase.PickType.Square, 10.0f);
            _hotSpotVolume.DisplayScaling = 100.0f;
            _hotSpotVolume.StartDistance  = Volume;
            _hotSpotVolume.Axis           = this.ZAxis;
            _hotSpotVolume.ToolTipText    = "Volume";
            _hotSpotVolume.SetRange(0.0f, 1.0f);
            EditorManager.ActiveView.HotSpots.Add(_hotSpotVolume);

            // hotspots for distance fading
            _hotSpotFadeMin = new HotSpotDistance(this, @"textures\Hotspot_D.tga", VisionColors.Blue, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotFadeMin.StartDistance  = MinDistance;
            _hotSpotFadeMin.Axis           = this.XAxis;
            _hotSpotFadeMin.DisplayScaling = UniformScaling;
            _hotSpotFadeMin.ToolTipText    = "min distance";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotFadeMin);
            _hotSpotFadeMax = new HotSpotDistance(this, @"textures\Hotspot_D.tga", VisionColors.Blue, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotFadeMax.StartDistance  = MaxDistance;
            _hotSpotFadeMax.Axis           = this.XAxis;
            _hotSpotFadeMax.DisplayScaling = UniformScaling;
            _hotSpotFadeMax.ToolTipText    = "max distance";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotFadeMax);

            // hotspots for cone angles
            _hotSpotOuterCone             = new HotSpotConeAngle(this, @"textures\Hotspot_A.tga", VisionColors.Red, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotOuterCone.Distance    = 120.0f * EditorManager.Settings.GlobalUnitScaling;
            _hotSpotOuterCone.StartAngle  = this.ConeOutside;
            _hotSpotOuterCone.ToolTipText = "Outer cone angle";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotOuterCone);
            _hotSpotInnerCone             = new HotSpotConeAngle(this, @"textures\Hotspot_A.tga", VisionColors.Red, HotSpotBase.PickType.Square, 4.0f);
            _hotSpotInnerCone.Distance    = 100.0f * EditorManager.Settings.GlobalUnitScaling;
            _hotSpotInnerCone.StartAngle  = this.ConeInside;
            _hotSpotInnerCone.ToolTipText = "Inner cone angle";
            EditorManager.ActiveView.HotSpots.Add(_hotSpotInnerCone);

            // hotspot for playing sound
            _hotSpotPlaySound             = new HotSpotPlayButton(this, @"textures\Media_play.TGA", VisionColors.RGBA(200, 200, 200, 255), VisionColors.White, 15.0f);
            _hotSpotPlaySound.ToolTipText = "Play sound";
            _hotSpotPlaySound.Set2DOffset(0.0f, 30.0f);
            EditorManager.ActiveView.HotSpots.Add(_hotSpotPlaySound);

            UpdateHotspotVisibility();
        }
Example #4
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected();

            // start button
            _hotSpotStartEvent             = new HotSpotPlayButton(this, @"textures\Media_play.TGA", VisionColors.RGBA(200, 200, 200, 255), VisionColors.White, 15.0f);
            _hotSpotStartEvent.ToolTipText = "Start event";
            _hotSpotStartEvent.Set2DOffset(0.0f, 30.0f);
            EditorManager.ActiveView.HotSpots.Add(_hotSpotStartEvent);

            // Update the engine instance, in order to offer stolen info-only events the possibility to convert into a playable event instance. Thus hotspot button
            // will be always available for all event instances. Please note: All stolen event instances, which have a "Max playbacks behavior" without failing
            // (1 = steal oldest, 2 = steal newest, 3 = steal quietest), will not recover. This is absolute necessary, in order to avoid an endless cycle of stealing
            // and recovering of such event instances, as none of the requests for a not info-only event will fail. Thus for these events, the hotspot button will
            // not be available.
            EngineFmodEvent.Update();

            UpdateHotspotVisibility();
        }
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspot again:
              SafeRemoveHotSpot(_hotSpotStartEvent); _hotSpotStartEvent = null;

              base.OnUnSelected();
        }
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected();

              // start button
              _hotSpotStartEvent = new HotSpotPlayButton(this, @"textures\Media_play.TGA", VisionColors.RGBA(200, 200, 200, 255), VisionColors.White, 15.0f);
              _hotSpotStartEvent.ToolTipText = "Start event";
              _hotSpotStartEvent.Set2DOffset(0.0f, 30.0f);
              EditorManager.ActiveView.HotSpots.Add(_hotSpotStartEvent);

              // Update the engine instance, in order to offer stolen info-only events the possibility to convert into a playable event instance. Thus hotspot button
              // will be always available for all event instances. Please note: All stolen event instances, which have a "Max playbacks behavior" without failing
              // (1 = steal oldest, 2 = steal newest, 3 = steal quietest), will not recover. This is absolute necessary, in order to avoid an endless cycle of stealing
              // and recovering of such event instances, as none of the requests for a not info-only event will fail. Thus for these events, the hotspot button will
              // not be available.
              EngineFmodEvent.Update();

              UpdateHotspotVisibility();
        }
Example #7
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnUnSelected()
        {
            // release the hotspots again:
              SafeRemoveHotSpot(_hotSpotVolume); _hotSpotVolume = null;
              SafeRemoveHotSpot(_hotSpotFadeMin); _hotSpotFadeMin = null;
              SafeRemoveHotSpot(_hotSpotFadeMax); _hotSpotFadeMax = null;
              SafeRemoveHotSpot(_hotSpotPlaySound); _hotSpotPlaySound = null;
              SafeRemoveHotSpot(_hotSpotOuterCone); _hotSpotOuterCone = null;
              SafeRemoveHotSpot(_hotSpotInnerCone); _hotSpotInnerCone = null;

              base.OnUnSelected();
        }
Example #8
0
        /// <summary>
        /// Overridden function
        /// </summary>
        public override void OnSelected()
        {
            base.OnSelected ();

              System.Diagnostics.Debug.Assert(_hotSpotVolume==null);

              // hotspot for sound volume
              _hotSpotVolume = new HotSpotDistance(this, @"textures\Hotspot_V.tga", VisionColors.Cyan, HotSpotBase.PickType.Square, 10.0f);
              _hotSpotVolume.DisplayScaling = 100.0f;
              _hotSpotVolume.StartDistance = Volume;
              _hotSpotVolume.Axis = this.ZAxis;
              _hotSpotVolume.ToolTipText = "Volume";
              _hotSpotVolume.SetRange(0.0f, 1.0f);
              EditorManager.ActiveView.HotSpots.Add(_hotSpotVolume);

              // hotspots for distance fading
              _hotSpotFadeMin = new HotSpotDistance(this, @"textures\Hotspot_D.tga", VisionColors.Blue, HotSpotBase.PickType.Square, 4.0f);
              _hotSpotFadeMin.StartDistance = MinDistance;
              _hotSpotFadeMin.Axis = this.XAxis;
              _hotSpotFadeMin.DisplayScaling = UniformScaling;
              _hotSpotFadeMin.ToolTipText = "min distance";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotFadeMin);
              _hotSpotFadeMax = new HotSpotDistance(this, @"textures\Hotspot_D.tga", VisionColors.Blue, HotSpotBase.PickType.Square, 4.0f);
              _hotSpotFadeMax.StartDistance = MaxDistance;
              _hotSpotFadeMax.Axis = this.XAxis;
              _hotSpotFadeMax.DisplayScaling = UniformScaling;
              _hotSpotFadeMax.ToolTipText = "max distance";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotFadeMax);

              // hotspots for cone angles
              _hotSpotOuterCone = new HotSpotConeAngle(this, @"textures\Hotspot_A.tga", VisionColors.Red, HotSpotBase.PickType.Square, 4.0f);
              _hotSpotOuterCone.Distance = 120.0f * EditorManager.Settings.GlobalUnitScaling;
              _hotSpotOuterCone.StartAngle = this.ConeOutside;
              _hotSpotOuterCone.ToolTipText = "Outer cone angle";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotOuterCone);
              _hotSpotInnerCone = new HotSpotConeAngle(this, @"textures\Hotspot_A.tga", VisionColors.Red, HotSpotBase.PickType.Square, 4.0f);
              _hotSpotInnerCone.Distance = 100.0f * EditorManager.Settings.GlobalUnitScaling;
              _hotSpotInnerCone.StartAngle = this.ConeInside;
              _hotSpotInnerCone.ToolTipText = "Inner cone angle";
              EditorManager.ActiveView.HotSpots.Add(_hotSpotInnerCone);

              // hotspot for playing sound
              _hotSpotPlaySound = new HotSpotPlayButton(this, @"textures\Media_play.TGA", VisionColors.RGBA(200,200,200,255), VisionColors.White, 15.0f);
              _hotSpotPlaySound.ToolTipText = "Play sound";
              _hotSpotPlaySound.Set2DOffset(0.0f, 30.0f);
              EditorManager.ActiveView.HotSpots.Add(_hotSpotPlaySound);

              UpdateHotspotVisibility();
        }