1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-28 18:40:22 +08:00

Add scroll view because

This commit is contained in:
Dean Herbert
2020-03-17 22:21:16 +09:00
Unverified
parent 2d6dcb3ba9
commit 48cbec7a31
+32 -4
View File
@@ -7,6 +7,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Screens;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
using osu.Game.Scoring;
using osu.Game.Screens.Backgrounds;
@@ -43,11 +44,14 @@ namespace osu.Game.Screens.Ranking
{
InternalChildren = new[]
{
new ScorePanel(score)
new ResultsScrollContainer
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
State = PanelState.Expanded
Child = new ScorePanel(score)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
State = PanelState.Expanded
},
},
bottomPanel = new Container
{
@@ -110,5 +114,29 @@ namespace osu.Game.Screens.Ranking
return base.OnExiting(next);
}
private class ResultsScrollContainer : OsuScrollContainer
{
private readonly Container content;
protected override Container<Drawable> Content => content;
public ResultsScrollContainer()
{
base.Content.Add(content = new Container
{
RelativeSizeAxes = Axes.X
});
RelativeSizeAxes = Axes.Both;
ScrollbarVisible = false;
}
protected override void Update()
{
base.Update();
content.Height = DrawHeight;
}
}
}
}