Example #1
0
        public EffectPropertyChanger(UILogic uiLogic, UIComponent parent, TimeSpan creationTime, EffectProperty effectProperty)
            : base(uiLogic, parent, creationTime)
        {
            this.Modal = false;
            this.Alive = true;
            this.Visible = true;
            this.ListUIChildren = new List<UIComponent>();
            this.effectProperty = effectProperty;

            //---
            MouseManager mouseLeft = AddMouse(MouseButtons.LeftButton);
            mouseLeft.MouseFirstPressed += new MouseManager.MouseFirstPressedHandler(mouseLeft_MouseFirstPressed);
            mouseLeft.MousePressed += new MouseManager.MousePressedHandler(mouseLeft_MousePressed);
            mouseLeft.MouseReleased += new MouseManager.MouseReleasedHandler(mouseLeft_MouseReleased);
            //---
        }
Example #2
0
        private void AddEffectProperty()
        {
            IList<Slider> sliders = Context.GameEngine.Sound.GetEffectParameters(Name);
            ListEffectProperty = new List<EffectProperty>();

            foreach (Slider slider in sliders)
            {
                EffectProperty effectProperty = new EffectProperty();
                effectProperty.Description = slider.Description;
                effectProperty.Default = slider.Default;
                effectProperty.Value = slider.Default;
                effectProperty.MinValue = slider.Minimum;
                effectProperty.MaxValue = slider.Maximum;
                effectProperty.Curve.Keys.Add(new CurveKey(0f, float.MinValue, 0f,0f, CurveContinuity.Step));

                ListEffectProperty.Add(effectProperty);
            }
        }