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