Add channels to chatManager.AvailableChannels by using a hack.

This commit is contained in:
miterosan 2018-11-21 21:44:56 +01:00
parent a14b6ac9df
commit 7f1f7300d3
1 changed files with 4 additions and 2 deletions

View File

@ -16,6 +16,7 @@
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays;
using osu.Framework.Configuration;
namespace osu.Game.Tests.Visual
{
@ -52,8 +53,9 @@ private void load(OsuColour colours)
linkColour = colours.Blue;
var chatManager = new ChannelManager();
chatManager.AvailableChannels.Add(new Channel { Name = "#english"});
chatManager.AvailableChannels.Add(new Channel { Name = "#japanese" });
BindableCollection<Channel> availableChannels = (BindableCollection<Channel>)chatManager.AvailableChannels;
availableChannels.Add(new Channel { Name = "#english"});
availableChannels.Add(new Channel { Name = "#japanese" });
Dependencies.Cache(chatManager);
Dependencies.Cache(new ChatOverlay());