mirror of
https://github.com/osukey/osukey.git
synced 2025-05-07 22:57:31 +09:00
Allow creating OnlineViewContainers with no placeholder button
This commit is contained in:
parent
a5a19319cc
commit
933c4010da
@ -23,13 +23,17 @@ namespace osu.Game.Online
|
|||||||
|
|
||||||
private readonly string placeholderMessage;
|
private readonly string placeholderMessage;
|
||||||
|
|
||||||
private Placeholder placeholder;
|
private Drawable placeholder;
|
||||||
|
|
||||||
private const double transform_duration = 300;
|
private const double transform_duration = 300;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
protected IAPIProvider API { get; private set; }
|
protected IAPIProvider API { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Construct a new instance of an online view container.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="placeholderMessage">The message to display when not logged in. If empty, no button will display.</param>
|
||||||
public OnlineViewContainer(string placeholderMessage)
|
public OnlineViewContainer(string placeholderMessage)
|
||||||
{
|
{
|
||||||
this.placeholderMessage = placeholderMessage;
|
this.placeholderMessage = placeholderMessage;
|
||||||
@ -40,10 +44,10 @@ namespace osu.Game.Online
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(IAPIProvider api)
|
private void load(IAPIProvider api)
|
||||||
{
|
{
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new[]
|
||||||
{
|
{
|
||||||
Content,
|
Content,
|
||||||
placeholder = new LoginPlaceholder(placeholderMessage),
|
placeholder = string.IsNullOrEmpty(placeholderMessage) ? Empty() : new LoginPlaceholder(placeholderMessage),
|
||||||
LoadingSpinner = new LoadingSpinner
|
LoadingSpinner = new LoadingSpinner
|
||||||
{
|
{
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user