mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:17:26 +08:00
Merge pull request #29770 from Ianlucht/Add-Animation-to-challenge-notification
Add daily challenge animation to daily challenge notification
This commit is contained in:
commit
139fc07a09
@ -5,6 +5,7 @@ using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Beatmaps.Drawables.Cards;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Online.API.Requests.Responses;
|
||||
using osu.Game.Online.Rooms;
|
||||
using osu.Game.Overlays.Notifications;
|
||||
@ -25,13 +26,17 @@ namespace osu.Game.Screens.OnlinePlay.DailyChallenge
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuGame? game)
|
||||
private void load(OsuGame? game, SessionStatics statics)
|
||||
{
|
||||
Text = DailyChallengeStrings.ChallengeLiveNotification;
|
||||
Content.Add(card = new BeatmapCardNano((APIBeatmapSet)room.Playlist.Single().Beatmap.BeatmapSet!));
|
||||
Activated = () =>
|
||||
{
|
||||
game?.PerformFromScreen(s => s.Push(new DailyChallenge(room)), [typeof(MainMenu)]);
|
||||
if (statics.Get<bool>(Static.DailyChallengeIntroPlayed))
|
||||
game?.PerformFromScreen(s => s.Push(new DailyChallenge(room)), [typeof(MainMenu)]);
|
||||
else
|
||||
game?.PerformFromScreen(s => s.Push(new DailyChallengeIntro(room)), [typeof(MainMenu)]);
|
||||
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user