mirror of
https://github.com/ppy/osu.git
synced 2024-11-18 08:52:54 +08:00
482a01e7ba
# Conflicts: # osu.Game/Online/API/Requests/Responses/APIBeatmap.cs # osu.Game/OsuGameBase.cs # osu.Game/Overlays/ChatOverlay.cs # osu.Game/Screens/Menu/MainMenu.cs # osu.Game/Screens/Tournament/Drawings.cs # osu.Game/Screens/Tournament/Teams/DrawingsTeam.cs # osu.Game/osu.Game.csproj # osu.sln
45 lines
1.2 KiB
C#
45 lines
1.2 KiB
C#
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
using osu.Framework.Allocation;
|
|
using osu.Framework.Graphics;
|
|
using osu.Game.Beatmaps;
|
|
using osu.Game.Beatmaps.Legacy;
|
|
using osu.Game.Tournament.Components;
|
|
using osu.Game.Tournament.IPC;
|
|
|
|
namespace osu.Game.Tournament.Screens
|
|
{
|
|
public abstract class BeatmapInfoScreen : TournamentScreen
|
|
{
|
|
protected readonly SongBar SongBar;
|
|
|
|
protected BeatmapInfoScreen()
|
|
{
|
|
AddInternal(SongBar = new SongBar
|
|
{
|
|
Anchor = Anchor.BottomRight,
|
|
Origin = Anchor.BottomRight,
|
|
});
|
|
}
|
|
|
|
[BackgroundDependencyLoader]
|
|
private void load(MatchIPCInfo ipc)
|
|
{
|
|
ipc.Beatmap.BindValueChanged(beatmapChanged, true);
|
|
ipc.Mods.BindValueChanged(modsChanged, true);
|
|
}
|
|
|
|
private void modsChanged(LegacyMods mods)
|
|
{
|
|
SongBar.Mods = mods;
|
|
}
|
|
|
|
private void beatmapChanged(BeatmapInfo beatmap)
|
|
{
|
|
SongBar.FadeInFromZero(300, Easing.OutQuint);
|
|
SongBar.Beatmap = beatmap;
|
|
}
|
|
}
|
|
}
|