2019-01-29 20:48:35 +08:00
|
|
|
// 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.
|
2019-01-25 14:36:22 +08:00
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Screens;
|
|
|
|
using osuTK;
|
|
|
|
|
|
|
|
namespace osu.Game.Screens
|
|
|
|
{
|
2019-01-31 17:10:21 +08:00
|
|
|
public class BackgroundScreenStack : ScreenStack
|
2019-01-25 14:36:22 +08:00
|
|
|
{
|
|
|
|
public BackgroundScreenStack()
|
2019-03-12 16:26:16 +08:00
|
|
|
: base(false)
|
2019-01-25 14:36:22 +08:00
|
|
|
{
|
2019-01-31 17:10:21 +08:00
|
|
|
Scale = new Vector2(1.06f);
|
|
|
|
RelativeSizeAxes = Axes.Both;
|
2019-02-06 17:14:33 +08:00
|
|
|
Anchor = Anchor.Centre;
|
|
|
|
Origin = Anchor.Centre;
|
2019-01-25 14:36:22 +08:00
|
|
|
}
|
|
|
|
|
2019-01-31 17:10:21 +08:00
|
|
|
//public float ParallaxAmount { set => parallax.ParallaxAmount = ParallaxContainer.DEFAULT_PARALLAX_AMOUNT * value; }
|
2019-01-25 14:36:22 +08:00
|
|
|
|
2019-01-31 17:10:21 +08:00
|
|
|
public new void Push(BackgroundScreen screen)
|
2019-01-25 14:36:22 +08:00
|
|
|
{
|
|
|
|
if (screen == null)
|
|
|
|
return;
|
|
|
|
|
2019-01-31 17:10:21 +08:00
|
|
|
if (EqualityComparer<BackgroundScreen>.Default.Equals((BackgroundScreen)CurrentScreen, screen))
|
2019-01-25 14:36:22 +08:00
|
|
|
return;
|
|
|
|
|
2019-01-31 17:10:21 +08:00
|
|
|
base.Push(screen);
|
2019-01-25 14:36:22 +08:00
|
|
|
}
|
|
|
|
}
|
2019-01-29 20:48:35 +08:00
|
|
|
}
|