Exemplo n.º 1
0
 protected override void OnControlPointChanged(ValueChangedEvent <DifficultyControlPoint> point)
 {
     if (point.NewValue != null)
     {
         multiplierSlider.Current = point.NewValue.SpeedMultiplierBindable;
         multiplierSlider.Current.BindValueChanged(_ => ChangeHandler?.SaveState());
     }
 }
Exemplo n.º 2
0
        protected override void OnControlPointChanged(ValueChangedEvent <SampleControlPoint> point)
        {
            if (point.NewValue != null)
            {
                bank.Current = point.NewValue.SampleBankBindable;
                bank.Current.BindValueChanged(_ => ChangeHandler?.SaveState());

                volume.Current = point.NewValue.SampleVolumeBindable;
                volume.Current.BindValueChanged(_ => ChangeHandler?.SaveState());
            }
        }
Exemplo n.º 3
0
        protected override void OnControlPointChanged(ValueChangedEvent <EffectControlPoint> point)
        {
            if (point.NewValue != null)
            {
                kiai.Current = point.NewValue.KiaiModeBindable;
                kiai.Current.BindValueChanged(_ => ChangeHandler?.SaveState());

                omitBarLine.Current = point.NewValue.OmitFirstBarLineBindable;
                omitBarLine.Current.BindValueChanged(_ => ChangeHandler?.SaveState());
            }
        }
Exemplo n.º 4
0
        protected override void OnControlPointChanged(ValueChangedEvent <TimingControlPoint> point)
        {
            if (point.NewValue != null)
            {
                bpmTextEntry.Bindable = point.NewValue.BeatLengthBindable;
                bpmTextEntry.Current.BindValueChanged(_ => ChangeHandler?.SaveState());

                timeSignature.Current = point.NewValue.TimeSignatureBindable;
                timeSignature.Current.BindValueChanged(_ => ChangeHandler?.SaveState());
            }
        }
Exemplo n.º 5
0
        protected override void OnControlPointChanged(ValueChangedEvent <TimingControlPoint> point)
        {
            if (point.NewValue != null)
            {
                bpmSlider.Current = point.NewValue.BeatLengthBindable;
                bpmSlider.Current.BindValueChanged(_ => ChangeHandler?.SaveState());

                bpmTextEntry.Bindable = point.NewValue.BeatLengthBindable;
                // no need to hook change handler here as it's the same bindable as above

                timeSignature.Current = point.NewValue.TimeSignatureBindable;
                timeSignature.Current.BindValueChanged(_ => ChangeHandler?.SaveState());
            }
        }
Exemplo n.º 6
0
        protected override void LoadComplete()
        {
            base.LoadComplete();

            bpmTextEntry.Current.BindValueChanged(_ => saveChanges());
            timeSignature.Current.BindValueChanged(_ => saveChanges());

            void saveChanges()
            {
                if (!isRebinding)
                {
                    ChangeHandler?.SaveState();
                }
            }
        }
Exemplo n.º 7
0
        protected override void LoadComplete()
        {
            base.LoadComplete();

            kiai.Current.BindValueChanged(_ => saveChanges());
            omitBarLine.Current.BindValueChanged(_ => saveChanges());
            scrollSpeedSlider.Current.BindValueChanged(_ => saveChanges());

            void saveChanges()
            {
                if (!isRebinding)
                {
                    ChangeHandler?.SaveState();
                }
            }
        }
Exemplo n.º 8
0
        protected override void OnControlPointChanged(ValueChangedEvent <DifficultyControlPoint> point)
        {
            if (point.NewValue != null)
            {
                var selectedPointBindable = point.NewValue.SpeedMultiplierBindable;

                // there may be legacy control points, which contain infinite precision for compatibility reasons (see LegacyDifficultyControlPoint).
                // generally that level of precision could only be set by externally editing the .osu file, so at the point
                // a user is looking to update this within the editor it should be safe to obliterate this additional precision.
                double expectedPrecision = new DifficultyControlPoint().SpeedMultiplierBindable.Precision;
                if (selectedPointBindable.Precision < expectedPrecision)
                {
                    selectedPointBindable.Precision = expectedPrecision;
                }

                multiplierSlider.Current = selectedPointBindable;
                multiplierSlider.Current.BindValueChanged(_ => ChangeHandler?.SaveState());
            }
        }