1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-08 06:19:38 +08:00
osu-lazer/osu.Game/Screens/Select/MatchSongSelect.cs

38 lines
992 B
C#
Raw Normal View History

2018-04-13 17:19:50 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
2018-12-25 16:17:51 +08:00
using Humanizer;
using osu.Game.Online.Multiplayer;
2018-12-10 18:20:41 +08:00
using osu.Game.Screens.Multi;
2018-04-13 17:19:50 +08:00
namespace osu.Game.Screens.Select
{
2018-12-26 19:05:57 +08:00
public class MatchSongSelect : SongSelect, IMultiplayerSubScreen
2018-04-13 17:19:50 +08:00
{
public Action<PlaylistItem> Selected;
public string ShortTitle => "song selection";
2018-12-25 16:17:51 +08:00
public override string Title => ShortTitle.Humanize();
protected override bool OnStart()
2018-04-13 17:19:50 +08:00
{
var item = new PlaylistItem
{
Beatmap = Beatmap.Value.BeatmapInfo,
Ruleset = Ruleset.Value,
RulesetID = Ruleset.Value.ID ?? 0
};
item.RequiredMods.AddRange(SelectedMods.Value);
Selected?.Invoke(item);
if (IsCurrentScreen)
Exit();
2018-04-13 17:19:50 +08:00
return true;
}
}
}