Remove upwards reference.

This commit is contained in:
Dean Herbert 2016-10-12 15:22:57 +09:00
parent 9276244d6a
commit 24771a62cf
2 changed files with 6 additions and 4 deletions

View File

@ -56,7 +56,7 @@ namespace osu.Game
OnPlayModeChange = delegate (PlayMode m) { PlayMode.Value = m; },
Alpha = 0.001f,
},
Chat = new ChatConsole(),
Chat = new ChatConsole(API),
new VolumeControl
{
VolumeGlobal = Audio.Volume,

View File

@ -27,8 +27,6 @@ namespace osu.Game.Overlays
{
public class ChatConsole : Container, IStateful<ChatConsoleState>
{
private APIAccess api => ((OsuGameBase)Game).API;
private ChannelDisplay channelDisplay;
private ScheduledDelegate messageRequest;
@ -37,8 +35,12 @@ namespace osu.Game.Overlays
protected override Container Content => content;
public ChatConsole()
private APIAccess api;
public ChatConsole(APIAccess api)
{
this.api = api;
RelativeSizeAxes = Axes.X;
Size = new Vector2(1, 300);
Anchor = Anchor.BottomLeft;