mirror of
https://github.com/ppy/osu
synced 2025-01-03 04:42:10 +00:00
Use new bind method
This commit is contained in:
parent
e6158bc348
commit
475fb06559
@ -237,11 +237,8 @@ namespace osu.Game.Overlays
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
beatmap.ValueChanged += beatmapChanged;
|
||||
beatmap.DisabledChanged += beatmapDisabledChanged;
|
||||
|
||||
beatmapChanged(beatmap.Value);
|
||||
|
||||
beatmap.BindValueChanged(beatmapChanged, true);
|
||||
beatmap.BindDisabledChanged(beatmapDisabledChanged, true);
|
||||
base.LoadComplete();
|
||||
}
|
||||
|
||||
|
@ -47,9 +47,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
|
||||
private void load(IBindableBeatmap beatmap)
|
||||
{
|
||||
this.beatmap.BindTo(beatmap);
|
||||
|
||||
beatmap.ValueChanged += beatmapChanged;
|
||||
beatmapChanged(beatmap.Value);
|
||||
this.beatmap.BindValueChanged(beatmapChanged, true);
|
||||
}
|
||||
|
||||
private void beatmapChanged(WorkingBeatmap beatmap) => waveform.Beatmap = beatmap;
|
||||
|
@ -207,10 +207,8 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
Carousel.BeatmapSets = this.beatmaps.GetAllUsableBeatmapSetsEnumerable();
|
||||
|
||||
Beatmap.DisabledChanged += disabled => Carousel.AllowSelection = !disabled;
|
||||
Beatmap.ValueChanged += workingBeatmapChanged;
|
||||
|
||||
workingBeatmapChanged(Beatmap.Value);
|
||||
Beatmap.BindDisabledChanged(disabled => Carousel.AllowSelection = !disabled, true);
|
||||
Beatmap.BindValueChanged(workingBeatmapChanged);
|
||||
}
|
||||
|
||||
public void Edit(BeatmapInfo beatmap)
|
||||
|
@ -32,8 +32,7 @@ namespace osu.Game.Tests.Visual
|
||||
Dependencies.CacheAs<IFrameBasedClock>(Clock);
|
||||
Dependencies.CacheAs<IAdjustableClock>(Clock);
|
||||
|
||||
Beatmap.ValueChanged += beatmapChanged;
|
||||
beatmapChanged(Beatmap.Value);
|
||||
Beatmap.BindValueChanged(beatmapChanged, true);
|
||||
}
|
||||
|
||||
private void beatmapChanged(WorkingBeatmap working)
|
||||
|
@ -18,7 +18,7 @@
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.0.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.0.3" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2018.606.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2018.607.0" />
|
||||
<PackageReference Include="SharpCompress" Version="0.18.1" />
|
||||
<PackageReference Include="NUnit" Version="3.10.1" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="4.4.0" />
|
||||
|
Loading…
Reference in New Issue
Block a user