mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
Scroll to bottom.
This commit is contained in:
parent
aac4ba2baa
commit
cde660a8ef
@ -17,6 +17,7 @@ namespace osu.Game.Online.Chat.Drawables
|
|||||||
{
|
{
|
||||||
private readonly Channel channel;
|
private readonly Channel channel;
|
||||||
private FlowContainer flow;
|
private FlowContainer flow;
|
||||||
|
private ScrollContainer scroll;
|
||||||
|
|
||||||
public DrawableChannel(Channel channel)
|
public DrawableChannel(Channel channel)
|
||||||
{
|
{
|
||||||
@ -36,7 +37,7 @@ namespace osu.Game.Online.Chat.Drawables
|
|||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre
|
Origin = Anchor.Centre
|
||||||
},
|
},
|
||||||
new ScrollContainer
|
scroll = new ScrollContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
@ -77,6 +78,8 @@ namespace osu.Game.Online.Chat.Drawables
|
|||||||
|
|
||||||
while (flow.Children.Count() > Channel.MAX_HISTORY)
|
while (flow.Children.Count() > Channel.MAX_HISTORY)
|
||||||
flow.Remove(flow.Children.First());
|
flow.Remove(flow.Children.First());
|
||||||
|
|
||||||
|
scroll.ScrollTo(flow.DrawHeight, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user