mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
Merge remote-tracking branch 'upstream/master' into editor-timing-screen-2
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Overlays.Settings;
|
||||
|
||||
@ -26,17 +27,12 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
});
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
protected override void OnControlPointChanged(ValueChangedEvent<DifficultyControlPoint> point)
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
ControlPoint.BindValueChanged(point =>
|
||||
if (point.NewValue != null)
|
||||
{
|
||||
if (point.NewValue != null)
|
||||
{
|
||||
multiplier.Bindable = point.NewValue.SpeedMultiplierBindable;
|
||||
}
|
||||
}, true);
|
||||
multiplier.Bindable = point.NewValue.SpeedMultiplierBindable;
|
||||
}
|
||||
}
|
||||
|
||||
protected override DifficultyControlPoint CreatePoint()
|
||||
|
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Graphics.UserInterfaceV2;
|
||||
|
||||
@ -22,18 +23,13 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
});
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
protected override void OnControlPointChanged(ValueChangedEvent<EffectControlPoint> point)
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
ControlPoint.BindValueChanged(point =>
|
||||
if (point.NewValue != null)
|
||||
{
|
||||
if (point.NewValue != null)
|
||||
{
|
||||
kiai.Current = point.NewValue.KiaiModeBindable;
|
||||
omitBarLine.Current = point.NewValue.OmitFirstBarLineBindable;
|
||||
}
|
||||
});
|
||||
kiai.Current = point.NewValue.KiaiModeBindable;
|
||||
omitBarLine.Current = point.NewValue.OmitFirstBarLineBindable;
|
||||
}
|
||||
}
|
||||
|
||||
protected override EffectControlPoint CreatePoint()
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Graphics.UserInterfaceV2;
|
||||
using osu.Game.Overlays.Settings;
|
||||
@ -31,6 +32,15 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
});
|
||||
}
|
||||
|
||||
protected override void OnControlPointChanged(ValueChangedEvent<SampleControlPoint> point)
|
||||
{
|
||||
if (point.NewValue != null)
|
||||
{
|
||||
bank.Current = point.NewValue.SampleBankBindable;
|
||||
volume.Bindable = point.NewValue.SampleVolumeBindable;
|
||||
}
|
||||
}
|
||||
|
||||
protected override SampleControlPoint CreatePoint()
|
||||
{
|
||||
var reference = Beatmap.Value.Beatmap.ControlPointInfo.SamplePointAt(SelectedGroup.Value.Time);
|
||||
@ -41,19 +51,5 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
SampleVolume = reference.SampleVolume,
|
||||
};
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
ControlPoint.BindValueChanged(point =>
|
||||
{
|
||||
if (point.NewValue != null)
|
||||
{
|
||||
bank.Current = point.NewValue.SampleBankBindable;
|
||||
volume.Bindable = point.NewValue.SampleVolumeBindable;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -119,8 +119,12 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
ControlPoint.Value = points.NewValue?.ControlPoints.OfType<T>().FirstOrDefault();
|
||||
checkbox.Current.Value = ControlPoint.Value != null;
|
||||
}, true);
|
||||
|
||||
ControlPoint.BindValueChanged(OnControlPointChanged, true);
|
||||
}
|
||||
|
||||
protected abstract void OnControlPointChanged(ValueChangedEvent<T> point);
|
||||
|
||||
protected abstract T CreatePoint();
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
public class TimingScreen : EditorScreenWithTimeline
|
||||
{
|
||||
[Cached]
|
||||
private Bindable<ControlPointGroup> selectedPoints = new Bindable<ControlPointGroup>();
|
||||
private Bindable<ControlPointGroup> selectedGroup = new Bindable<ControlPointGroup>();
|
||||
|
||||
[Resolved]
|
||||
private IAdjustableClock clock { get; set; }
|
||||
@ -47,7 +47,11 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
selectedPoints.BindValueChanged(selected => { clock.Seek(selected.NewValue.Time); });
|
||||
selectedGroup.BindValueChanged(selected =>
|
||||
{
|
||||
if (selected.NewValue != null)
|
||||
clock.Seek(selected.NewValue.Time);
|
||||
});
|
||||
}
|
||||
|
||||
public class ControlPointList : CompositeDrawable
|
||||
|
@ -32,18 +32,13 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
});
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
protected override void OnControlPointChanged(ValueChangedEvent<TimingControlPoint> point)
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
ControlPoint.BindValueChanged(point =>
|
||||
if (point.NewValue != null)
|
||||
{
|
||||
if (point.NewValue != null)
|
||||
{
|
||||
bpm.Bindable = point.NewValue.BeatLengthBindable;
|
||||
timeSignature.Bindable = point.NewValue.TimeSignatureBindable;
|
||||
}
|
||||
});
|
||||
bpm.Bindable = point.NewValue.BeatLengthBindable;
|
||||
timeSignature.Bindable = point.NewValue.TimeSignatureBindable;
|
||||
}
|
||||
}
|
||||
|
||||
protected override TimingControlPoint CreatePoint()
|
||||
|
Reference in New Issue
Block a user