Open login overlay when notification asking for signing in to play multi is clicked

This commit is contained in:
Lucas A 2019-04-06 18:05:13 +02:00
parent d5b7865ab8
commit 59410dbe3b
1 changed files with 10 additions and 2 deletions

View File

@ -103,6 +103,9 @@ public ButtonSystem()
[Resolved(CanBeNull = true)]
private NotificationOverlay notifications { get; set; }
[Resolved]
private LoginOverlay loginOverlay { get; set; }
[BackgroundDependencyLoader(true)]
private void load(AudioManager audio, IdleTracker idleTracker, GameHost host)
{
@ -134,8 +137,13 @@ private void onMulti()
{
notifications?.Post(new SimpleNotification
{
Text = "You gotta be logged in to multi 'yo!",
Icon = FontAwesome.Solid.Globe
Text = "You gotta be logged in to multi 'yo!",
Icon = FontAwesome.Solid.Globe,
Activated = () =>
{
loginOverlay.Show();
return true;
}
});
return;