コード例 #1
0
ファイル: DifficultySection.cs プロジェクト: vmaggioli/osu
 protected override void OnControlPointChanged(ValueChangedEvent <DifficultyControlPoint> point)
 {
     if (point.NewValue != null)
     {
         multiplierSlider.Current = point.NewValue.SpeedMultiplierBindable;
         multiplierSlider.Current.BindValueChanged(_ => ChangeHandler?.SaveState());
     }
 }
コード例 #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());
            }
        }
コード例 #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());
            }
        }
コード例 #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());
            }
        }
コード例 #5
0
ファイル: TimingSection.cs プロジェクト: appleneko2001/osu
        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());
            }
        }
コード例 #6
0
ファイル: TimingSection.cs プロジェクト: Henry-YSLin/osu
        protected override void LoadComplete()
        {
            base.LoadComplete();

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

            void saveChanges()
            {
                if (!isRebinding)
                {
                    ChangeHandler?.SaveState();
                }
            }
        }
コード例 #7
0
ファイル: EffectSection.cs プロジェクト: Wieku/osu
        protected override void LoadComplete()
        {
            base.LoadComplete();

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

            void saveChanges()
            {
                if (!isRebinding)
                {
                    ChangeHandler?.SaveState();
                }
            }
        }
コード例 #8
0
ファイル: DifficultySection.cs プロジェクト: shadiwolf/e
        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());
            }
        }