mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 04:13:11 +08:00
Apply review suggestions
This commit is contained in:
parent
0422b326ad
commit
f00938971e
@ -26,7 +26,7 @@ namespace osu.Game.Tests.Visual.Online
|
|||||||
Child = new Container
|
Child = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Child = onlineView = new OnlineViewContainer(@"Please login to view dummy test content")
|
Child = onlineView = new OnlineViewContainer(@"view dummy test content")
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
|
@ -23,6 +23,9 @@ namespace osu.Game.Online
|
|||||||
|
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
protected IAPIProvider API { get; private set; }
|
||||||
|
|
||||||
public OnlineViewContainer(string placeholderMessage)
|
public OnlineViewContainer(string placeholderMessage)
|
||||||
{
|
{
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
@ -35,12 +38,12 @@ namespace osu.Game.Online
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
Child = placeholder = new LoginPlaceholder(placeholderMessage)
|
Child = placeholder = new LoginPlaceholder($@"Please sign in to {placeholderMessage}")
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public void APIStateChanged(IAPIProvider api, APIState state)
|
public virtual void APIStateChanged(IAPIProvider api, APIState state)
|
||||||
{
|
{
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
@ -70,10 +73,16 @@ namespace osu.Game.Online
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
protected override void LoadComplete()
|
||||||
private void load(IAPIProvider api)
|
|
||||||
{
|
{
|
||||||
api.Register(this);
|
API?.Register(this);
|
||||||
|
base.LoadComplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Dispose(bool isDisposing)
|
||||||
|
{
|
||||||
|
API?.Unregister(this);
|
||||||
|
base.Dispose(isDisposing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user