1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 18:23:04 +08:00

Change default for null screen parallax, apply reviews

This commit is contained in:
David Zhao 2019-03-24 16:21:43 +09:00
parent db89796752
commit 5169f7a43c
3 changed files with 4 additions and 12 deletions

View File

@ -199,8 +199,6 @@ namespace osu.Game
LocalConfig.BindWith(OsuSetting.VolumeInactive, inactiveVolumeAdjust);
IsActive.BindValueChanged(active => updateActiveState(active.NewValue), true);
screenStack = new OsuScreenStack { RelativeSizeAxes = Axes.Both };
}
private ExternalLinkOpener externalLinkOpener;
@ -388,7 +386,7 @@ namespace osu.Game
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
screenStack,
screenStack = new OsuScreenStack { RelativeSizeAxes = Axes.Both },
logoContainer = new Container { RelativeSizeAxes = Axes.Both },
}
},
@ -407,7 +405,7 @@ namespace osu.Game
{
logoContainer.Add(logo);
// Loader has to be created synchronously in order for DI to be successful for its background screen stack.
// Loader has to be created after the logo has finished loading as Loader performs logo transformations on entering.
screenStack.Push(new Loader
{
RelativeSizeAxes = Axes.Both

View File

@ -42,10 +42,7 @@ namespace osu.Game.Screens
private void setParallax(IScreen prev, IScreen next)
{
if (next != null)
{
parallaxContainer.ParallaxAmount = ParallaxContainer.DEFAULT_PARALLAX_AMOUNT * ((IOsuScreen)next).BackgroundParallaxAmount;
}
parallaxContainer.ParallaxAmount = ParallaxContainer.DEFAULT_PARALLAX_AMOUNT * ((IOsuScreen)next)?.BackgroundParallaxAmount ?? 1.0f;
}
}
}

View File

@ -15,10 +15,7 @@ namespace osu.Game.Tests.Visual
protected ScreenTestCase()
{
Children = new Drawable[]
{
stack = new OsuScreenStack { RelativeSizeAxes = Axes.Both }
};
Child = stack = new OsuScreenStack { RelativeSizeAxes = Axes.Both };
}
protected void LoadScreen(OsuScreen screen)