Skip to content

Commit

Permalink
Merge pull request #29770 from Ianlucht/Add-Animation-to-challenge-no…
Browse files Browse the repository at this point in the history
…tification

Add daily challenge animation to daily challenge notification
  • Loading branch information
bdach authored Sep 8, 2024
2 parents e88083a + cd94d6e commit 139fc07
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
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;
Expand All @@ -25,13 +26,17 @@ public NewDailyChallengeNotification(Room room)
}

[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;
};
}
Expand Down

0 comments on commit 139fc07

Please sign in to comment.