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; }, OnPlayModeChange = delegate (PlayMode m) { PlayMode.Value = m; },
Alpha = 0.001f, Alpha = 0.001f,
}, },
Chat = new ChatConsole(), Chat = new ChatConsole(API),
new VolumeControl new VolumeControl
{ {
VolumeGlobal = Audio.Volume, VolumeGlobal = Audio.Volume,

View File

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