mirror of
https://github.com/ppy/osu.git
synced 2025-02-07 22:53:09 +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.Allocation;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Beatmaps.Drawables.Cards;
|
using osu.Game.Beatmaps.Drawables.Cards;
|
||||||
|
using osu.Game.Configuration;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Overlays.Notifications;
|
using osu.Game.Overlays.Notifications;
|
||||||
@ -25,13 +26,17 @@ namespace osu.Game.Screens.OnlinePlay.DailyChallenge
|
|||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuGame? game)
|
private void load(OsuGame? game, SessionStatics statics)
|
||||||
{
|
{
|
||||||
Text = DailyChallengeStrings.ChallengeLiveNotification;
|
Text = DailyChallengeStrings.ChallengeLiveNotification;
|
||||||
Content.Add(card = new BeatmapCardNano((APIBeatmapSet)room.Playlist.Single().Beatmap.BeatmapSet!));
|
Content.Add(card = new BeatmapCardNano((APIBeatmapSet)room.Playlist.Single().Beatmap.BeatmapSet!));
|
||||||
Activated = () =>
|
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;
|
return true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user