1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 00:53:10 +08:00

Merge pull request #18804 from Joehuu/online-view-chat-overlay

Add back online view container to chat overlay
This commit is contained in:
Dan Balasescu 2022-06-22 14:41:06 +09:00 committed by GitHub
commit b81c7c7951
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 },
},
}
}
}
}
}; };
} }