1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Allow setting the displayed text on LoginPlaceholder

This commit is contained in:
Lucas A 2020-01-12 15:50:35 +01:00
parent e1eda89ea6
commit e9a5298484
3 changed files with 4 additions and 4 deletions

View File

@ -151,7 +151,7 @@ namespace osu.Game.Online.Leaderboards
break;
case PlaceholderState.NotLoggedIn:
replacePlaceholder(new LoginPlaceholder());
replacePlaceholder(new LoginPlaceholder(@"Please sign in to view online leaderboards!"));
break;
case PlaceholderState.NotSupporter:

View File

@ -32,7 +32,7 @@ namespace osu.Game.Online
{
RelativeSizeAxes = Axes.Both,
Alpha = 0,
Child = placeholder = new LoginPlaceholder()
Child = placeholder = new LoginPlaceholder(placeholder_message)
},
};
}

View File

@ -14,7 +14,7 @@ namespace osu.Game.Online.Placeholders
[Resolved(CanBeNull = true)]
private LoginOverlay login { get; set; }
public LoginPlaceholder()
public LoginPlaceholder(string actionMessage)
{
AddIcon(FontAwesome.Solid.UserLock, cp =>
{
@ -22,7 +22,7 @@ namespace osu.Game.Online.Placeholders
cp.Padding = new MarginPadding { Right = 10 };
});
AddText(@"Please sign in to view online leaderboards!");
AddText(actionMessage);
}
protected override bool OnMouseDown(MouseDownEvent e)