mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 05:42:56 +08:00
Switch to using CompositeDrawable
This commit is contained in:
parent
f26c080512
commit
5464746d3d
@ -34,16 +34,17 @@ namespace osu.Game.Overlays.Dashboard.Friends
|
||||
|
||||
private Drawable currentContent;
|
||||
|
||||
private readonly FriendOnlineStreamControl onlineStreamControl;
|
||||
private readonly Box background;
|
||||
private readonly Box controlBackground;
|
||||
private readonly UserListToolbar userListToolbar;
|
||||
private readonly Container itemsPlaceholder;
|
||||
private readonly LoadingLayer loading;
|
||||
private FriendOnlineStreamControl onlineStreamControl;
|
||||
private Box background;
|
||||
private Box controlBackground;
|
||||
private UserListToolbar userListToolbar;
|
||||
private Container itemsPlaceholder;
|
||||
private LoadingLayer loading;
|
||||
|
||||
public FriendDisplay()
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
AddRange(new Drawable[]
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
new Container
|
||||
{
|
||||
@ -121,12 +122,8 @@ namespace osu.Game.Overlays.Dashboard.Friends
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OverlayColourProvider colourProvider)
|
||||
{
|
||||
background.Colour = colourProvider.Background4;
|
||||
controlBackground.Colour = colourProvider.Background5;
|
||||
}
|
||||
|
@ -9,29 +9,19 @@ using osu.Game.Online.API;
|
||||
namespace osu.Game.Overlays
|
||||
{
|
||||
/// <summary>
|
||||
/// Drawable which used to represent online content in <see cref="FullscreenOverlay"/>.
|
||||
/// A subview containing online content, to be displayed inside a <see cref="FullscreenOverlay"/>.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Response type</typeparam>
|
||||
public abstract class OverlayView<T> : Container, IOnlineComponent
|
||||
public abstract class OverlayView<T> : CompositeDrawable, IOnlineComponent
|
||||
where T : class
|
||||
{
|
||||
[Resolved]
|
||||
protected IAPIProvider API { get; private set; }
|
||||
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
private readonly FillFlowContainer content;
|
||||
|
||||
protected OverlayView()
|
||||
{
|
||||
RelativeSizeAxes = Axes.X;
|
||||
AutoSizeAxes = Axes.Y;
|
||||
|
||||
AddInternal(content = new FillFlowContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
});
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
|
Loading…
Reference in New Issue
Block a user