mirror of
https://github.com/osukey/osukey.git
synced 2025-05-25 07:27:19 +09:00
# Conflicts: # osu.Game/Screens/Multi/Match/MatchSubScreen.cs # osu.Game/Screens/Multi/Multiplayer.cs # osu.Game/Screens/Multi/MultiplayerSubScreen.cs # osu.Game/Screens/OsuScreen.cs # osu.Game/osu.Game.csproj # osu.sln
39 lines
1.0 KiB
C#
39 lines
1.0 KiB
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
using System;
|
|
using Humanizer;
|
|
using osu.Framework.Screens;
|
|
using osu.Game.Online.Multiplayer;
|
|
using osu.Game.Screens.Multi;
|
|
|
|
namespace osu.Game.Screens.Select
|
|
{
|
|
public class MatchSongSelect : SongSelect, IMultiplayerSubScreen
|
|
{
|
|
public Action<PlaylistItem> Selected;
|
|
|
|
public string ShortTitle => "song selection";
|
|
public override string Title => ShortTitle.Humanize();
|
|
|
|
protected override bool OnStart()
|
|
{
|
|
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 (this.IsCurrentScreen())
|
|
this.Exit();
|
|
|
|
return true;
|
|
}
|
|
}
|
|
}
|