Add back online view container to chat overlay

This commit is contained in:
Joseph Madamba 2022-06-21 19:06:08 -07:00
parent cf0f32f928
commit 07e0cd53a4

View File

@ -18,6 +18,7 @@ using osu.Game.Configuration;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Localisation; using osu.Game.Localisation;
using osu.Game.Online;
using osu.Game.Online.Chat; using osu.Game.Online.Chat;
using osu.Game.Overlays.Chat; using osu.Game.Overlays.Chat;
using osu.Game.Overlays.Chat.ChannelList; using osu.Game.Overlays.Chat.ChannelList;
@ -100,23 +101,10 @@ namespace osu.Game.Overlays
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Height = top_bar_height, Height = top_bar_height,
}, },
channelList = new ChannelList
{
RelativeSizeAxes = Axes.Y,
Width = side_bar_width,
Padding = new MarginPadding { Top = top_bar_height },
},
new Container new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Anchor = Anchor.TopRight, Padding = new MarginPadding { Top = top_bar_height },
Origin = Anchor.TopRight,
Padding = new MarginPadding
{
Top = top_bar_height,
Left = side_bar_width,
Bottom = chat_bar_height,
},
Children = new Drawable[] Children = new Drawable[]
{ {
new Box new Box
@ -124,24 +112,50 @@ namespace osu.Game.Overlays
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Colour = colourProvider.Background4, Colour = colourProvider.Background4,
}, },
currentChannelContainer = new Container<DrawableChannel> new OnlineViewContainer("Sign in to chat")
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}, Children = new Drawable[]
loading = new LoadingLayer(true), {
channelListing = new ChannelListing channelList = new ChannelList
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Y,
}, Width = side_bar_width,
}, },
}, new Container
textBar = new ChatTextBar {
{ RelativeSizeAxes = Axes.Both,
RelativeSizeAxes = Axes.X, Anchor = Anchor.TopRight,
Anchor = Anchor.BottomRight, Origin = Anchor.TopRight,
Origin = Anchor.BottomRight, Padding = new MarginPadding
Padding = new MarginPadding { Left = side_bar_width }, {
}, Left = side_bar_width,
Bottom = chat_bar_height,
},
Children = new Drawable[]
{
currentChannelContainer = new Container<DrawableChannel>
{
RelativeSizeAxes = Axes.Both,
},
loading = new LoadingLayer(true),
channelListing = new ChannelListing
{
RelativeSizeAxes = Axes.Both,
},
},
},
textBar = new ChatTextBar
{
RelativeSizeAxes = Axes.X,
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight,
Padding = new MarginPadding { Left = side_bar_width },
},
}
}
}
}
}; };
} }