mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 21:02:55 +08:00
9f8e724a76
Fix background being cut off at the top of the screen
35 lines
989 B
C#
35 lines
989 B
C#
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
using System.Collections.Generic;
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Screens;
|
|
using osuTK;
|
|
|
|
namespace osu.Game.Screens
|
|
{
|
|
public class BackgroundScreenStack : ScreenStack
|
|
{
|
|
public BackgroundScreenStack()
|
|
{
|
|
Scale = new Vector2(1.06f);
|
|
RelativeSizeAxes = Axes.Both;
|
|
Anchor = Anchor.Centre;
|
|
Origin = Anchor.Centre;
|
|
}
|
|
|
|
//public float ParallaxAmount { set => parallax.ParallaxAmount = ParallaxContainer.DEFAULT_PARALLAX_AMOUNT * value; }
|
|
|
|
public new void Push(BackgroundScreen screen)
|
|
{
|
|
if (screen == null)
|
|
return;
|
|
|
|
if (EqualityComparer<BackgroundScreen>.Default.Equals((BackgroundScreen)CurrentScreen, screen))
|
|
return;
|
|
|
|
base.Push(screen);
|
|
}
|
|
}
|
|
}
|