mirror of
https://github.com/ppy/osu.git
synced 2024-12-17 00:23:22 +08:00
added DailyChallengeIntro to notification
This commit is contained in:
parent
e88083adc1
commit
958bfde51d
@ -5,12 +5,14 @@ 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;
|
||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
using osu.Game.Localisation;
|
using osu.Game.Localisation;
|
||||||
|
|
||||||
|
|
||||||
namespace osu.Game.Screens.OnlinePlay.DailyChallenge
|
namespace osu.Game.Screens.OnlinePlay.DailyChallenge
|
||||||
{
|
{
|
||||||
public partial class NewDailyChallengeNotification : SimpleNotification
|
public partial class NewDailyChallengeNotification : SimpleNotification
|
||||||
@ -24,14 +26,18 @@ namespace osu.Game.Screens.OnlinePlay.DailyChallenge
|
|||||||
this.room = room;
|
this.room = room;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[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