mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 16:02:58 +08:00
Revert "Replace vertical scrolling in results screen with size-preserving container"
This reverts commit 298c2a1828
.
This commit is contained in:
parent
422531d8ec
commit
2f3ac61b47
@ -46,9 +46,9 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
{
|
{
|
||||||
const float winner_background_half_height = 250;
|
const float winner_background_half_height = 250;
|
||||||
|
|
||||||
Content.Anchor = Content.Origin = Anchor.TopCentre;
|
VerticalScrollContent.Anchor = VerticalScrollContent.Origin = Anchor.TopCentre;
|
||||||
Content.Scale = new Vector2(0.9f);
|
VerticalScrollContent.Scale = new Vector2(0.9f);
|
||||||
Content.Y = 75;
|
VerticalScrollContent.Y = 75;
|
||||||
|
|
||||||
var redScore = teamScores.First().Value;
|
var redScore = teamScores.First().Value;
|
||||||
var blueScore = teamScores.Last().Value;
|
var blueScore = teamScores.Last().Value;
|
||||||
|
@ -14,6 +14,7 @@ using osu.Framework.Input.Bindings;
|
|||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Framework.Screens;
|
using osu.Framework.Screens;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Input.Bindings;
|
using osu.Game.Input.Bindings;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
@ -40,7 +41,7 @@ namespace osu.Game.Screens.Ranking
|
|||||||
|
|
||||||
protected ScorePanelList ScorePanelList { get; private set; }
|
protected ScorePanelList ScorePanelList { get; private set; }
|
||||||
|
|
||||||
protected Container Content { get; private set; }
|
protected VerticalScrollContainer VerticalScrollContent { get; private set; }
|
||||||
|
|
||||||
[Resolved(CanBeNull = true)]
|
[Resolved(CanBeNull = true)]
|
||||||
private Player player { get; set; }
|
private Player player { get; set; }
|
||||||
@ -78,9 +79,10 @@ namespace osu.Game.Screens.Ranking
|
|||||||
{
|
{
|
||||||
new Drawable[]
|
new Drawable[]
|
||||||
{
|
{
|
||||||
Content = new DrawSizePreservingFillContainer
|
VerticalScrollContent = new VerticalScrollContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
ScrollbarVisible = false,
|
||||||
Child = new Container
|
Child = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -344,5 +346,25 @@ namespace osu.Game.Screens.Ranking
|
|||||||
public void OnReleased(KeyBindingReleaseEvent<GlobalAction> e)
|
public void OnReleased(KeyBindingReleaseEvent<GlobalAction> e)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected class VerticalScrollContainer : OsuScrollContainer
|
||||||
|
{
|
||||||
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
|
private readonly Container content;
|
||||||
|
|
||||||
|
public VerticalScrollContainer()
|
||||||
|
{
|
||||||
|
Masking = false;
|
||||||
|
|
||||||
|
base.Content.Add(content = new Container { RelativeSizeAxes = Axes.X });
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Update()
|
||||||
|
{
|
||||||
|
base.Update();
|
||||||
|
content.Height = Math.Max(screen_height, DrawHeight);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user