2019-03-04 12:24:19 +08:00
|
|
|
|
// 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.
|
2018-11-06 18:23:03 +08:00
|
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
2019-03-02 12:40:43 +08:00
|
|
|
|
using osu.Framework.Bindables;
|
2018-11-06 18:23:03 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Game.Beatmaps.Legacy;
|
|
|
|
|
using osu.Game.Tournament.Components;
|
2018-11-08 00:23:00 +08:00
|
|
|
|
using osu.Game.Tournament.IPC;
|
2022-06-18 06:34:09 +08:00
|
|
|
|
using osu.Game.Tournament.Models;
|
2018-11-06 18:23:03 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Tournament.Screens
|
|
|
|
|
{
|
2021-07-16 23:14:48 +08:00
|
|
|
|
public abstract partial class BeatmapInfoScreen : TournamentMatchScreen
|
2018-11-06 18:23:03 +08:00
|
|
|
|
{
|
|
|
|
|
protected readonly SongBar SongBar;
|
|
|
|
|
|
|
|
|
|
protected BeatmapInfoScreen()
|
|
|
|
|
{
|
2019-02-02 17:29:20 +08:00
|
|
|
|
AddInternal(SongBar = new SongBar
|
2018-11-06 18:23:03 +08:00
|
|
|
|
{
|
2018-11-11 00:29:42 +08:00
|
|
|
|
Anchor = Anchor.BottomRight,
|
|
|
|
|
Origin = Anchor.BottomRight,
|
2020-03-08 13:46:09 +08:00
|
|
|
|
Depth = float.MinValue,
|
2018-11-06 18:23:03 +08:00
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
2018-11-15 20:28:42 +08:00
|
|
|
|
private void load(MatchIPCInfo ipc)
|
2018-11-06 18:23:03 +08:00
|
|
|
|
{
|
2018-11-08 00:23:00 +08:00
|
|
|
|
ipc.Beatmap.BindValueChanged(beatmapChanged, true);
|
|
|
|
|
ipc.Mods.BindValueChanged(modsChanged, true);
|
2018-11-06 18:23:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2019-03-02 12:40:43 +08:00
|
|
|
|
private void modsChanged(ValueChangedEvent<LegacyMods> mods)
|
2018-11-06 18:23:03 +08:00
|
|
|
|
{
|
2019-03-02 12:40:43 +08:00
|
|
|
|
SongBar.Mods = mods.NewValue;
|
2018-11-06 18:23:03 +08:00
|
|
|
|
}
|
|
|
|
|
|
2022-06-18 06:34:09 +08:00
|
|
|
|
private void beatmapChanged(ValueChangedEvent<TournamentBeatmap> beatmap)
|
2018-11-06 18:23:03 +08:00
|
|
|
|
{
|
2018-11-08 00:23:00 +08:00
|
|
|
|
SongBar.FadeInFromZero(300, Easing.OutQuint);
|
2021-10-27 17:25:23 +08:00
|
|
|
|
SongBar.Beatmap = beatmap.NewValue;
|
2018-11-06 18:23:03 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|