From cde660a8efe801633cbf6df60f86ea6aa643b798 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Sun, 19 Feb 2017 18:07:35 +0900 Subject: [PATCH] Scroll to bottom. --- osu.Game/Online/Chat/Drawables/DrawableChannel.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game/Online/Chat/Drawables/DrawableChannel.cs b/osu.Game/Online/Chat/Drawables/DrawableChannel.cs index 07d5638766..e382b61452 100644 --- a/osu.Game/Online/Chat/Drawables/DrawableChannel.cs +++ b/osu.Game/Online/Chat/Drawables/DrawableChannel.cs @@ -17,6 +17,7 @@ namespace osu.Game.Online.Chat.Drawables { private readonly Channel channel; private FlowContainer flow; + private ScrollContainer scroll; public DrawableChannel(Channel channel) { @@ -36,7 +37,7 @@ namespace osu.Game.Online.Chat.Drawables Anchor = Anchor.Centre, Origin = Anchor.Centre }, - new ScrollContainer + scroll = new ScrollContainer { RelativeSizeAxes = Axes.Both, Children = new Drawable[] @@ -77,6 +78,8 @@ namespace osu.Game.Online.Chat.Drawables while (flow.Children.Count() > Channel.MAX_HISTORY) flow.Remove(flow.Children.First()); + + scroll.ScrollTo(flow.DrawHeight, false); } } } \ No newline at end of file