mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 02:22:56 +08:00
removed specific AddBeatmap method
the way UpdateBeatmapSet was extended it can handle all of this and better
This commit is contained in:
parent
105d01d85b
commit
3e417d8e30
@ -91,22 +91,6 @@ namespace osu.Game.Screens.Select
|
||||
});
|
||||
}
|
||||
|
||||
public void AddBeatmap(BeatmapSetInfo beatmapSet)
|
||||
{
|
||||
Schedule(() =>
|
||||
{
|
||||
var group = createGroup(beatmapSet);
|
||||
|
||||
if (group == null)
|
||||
return;
|
||||
|
||||
addGroup(group);
|
||||
computeYPositions();
|
||||
if (selectedGroup == null)
|
||||
selectGroup(group);
|
||||
});
|
||||
}
|
||||
|
||||
public void RemoveBeatmap(BeatmapSetInfo beatmapSet)
|
||||
{
|
||||
Schedule(() => removeGroup(groups.Find(b => b.BeatmapSet.ID == beatmapSet.ID)));
|
||||
|
@ -302,7 +302,7 @@ namespace osu.Game.Screens.Select
|
||||
carousel.Filter(criteria, debounce);
|
||||
}
|
||||
|
||||
private void onBeatmapSetAdded(BeatmapSetInfo s) => Schedule(() => addBeatmapSet(s));
|
||||
private void onBeatmapSetAdded(BeatmapSetInfo s) => Schedule(() => carousel.UpdateBeatmapSet(s));
|
||||
|
||||
private void onBeatmapSetRemoved(BeatmapSetInfo s) => Schedule(() => removeBeatmapSet(s));
|
||||
|
||||
@ -445,8 +445,6 @@ namespace osu.Game.Screens.Select
|
||||
}
|
||||
}
|
||||
|
||||
private void addBeatmapSet(BeatmapSetInfo beatmapSet) => carousel.AddBeatmap(beatmapSet);
|
||||
|
||||
private void removeBeatmapSet(BeatmapSetInfo beatmapSet)
|
||||
{
|
||||
carousel.RemoveBeatmap(beatmapSet);
|
||||
|
Loading…
Reference in New Issue
Block a user