Skip to content

Commit

Permalink
Merge pull request #25082 from peppy/test-scene-background
Browse files Browse the repository at this point in the history
Remove test scene background stack and use new `ChangeBackgroundColour`
  • Loading branch information
peppy authored Oct 12, 2023
2 parents f26e3af + 194ad96 commit d2044fc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion osu.Android.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Framework.Android" Version="2023.1006.0" />
<PackageReference Include="ppy.osu.Framework.Android" Version="2023.1012.0" />
</ItemGroup>
<PropertyGroup>
<!-- Fody does not handle Android build well, and warns when unchanged.
Expand Down
10 changes: 0 additions & 10 deletions osu.Game/Tests/OsuTestBrowser.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Framework.Graphics;
using osu.Framework.Platform;
using osu.Framework.Screens;
using osu.Framework.Testing;
using osu.Game.Graphics;
using osu.Game.Screens.Backgrounds;

namespace osu.Game.Tests
{
Expand All @@ -16,12 +12,6 @@ protected override void LoadComplete()
{
base.LoadComplete();

LoadComponentAsync(new ScreenStack(new BackgroundScreenDefault { Colour = OsuColour.Gray(0.5f) })
{
Depth = 10,
RelativeSizeAxes = Axes.Both,
}, Add);

// Have to construct this here, rather than in the constructor, because
// we depend on some dependencies to be loaded within OsuGameBase.load().
Add(new TestBrowser());
Expand Down
7 changes: 7 additions & 0 deletions osu.Game/Tests/Visual/OsuTestScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
using osu.Framework.Audio.Track;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers;
using osu.Framework.IO.Stores;
using osu.Framework.Platform;
using osu.Framework.Testing;
using osu.Framework.Timing;
using osu.Game.Beatmaps;
using osu.Game.Database;
using osu.Game.Graphics;
using osu.Game.Online.API;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Overlays;
Expand Down Expand Up @@ -158,10 +160,15 @@ protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnl
return Dependencies;
}

[Resolved]
private OsuColour colours { get; set; }

protected override void LoadComplete()
{
base.LoadComplete();

ChangeBackgroundColour(ColourInfo.GradientVertical(colours.GreyCarmine, colours.GreyCarmineDarker));

var parentBeatmap = Parent.Dependencies.Get<Bindable<WorkingBeatmap>>();
parentBeatmap.Value = Beatmap.Value;
Beatmap.BindTo(parentBeatmap);
Expand Down
2 changes: 1 addition & 1 deletion osu.Game/osu.Game.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Realm" Version="11.5.0" />
<PackageReference Include="ppy.osu.Framework" Version="2023.1006.0" />
<PackageReference Include="ppy.osu.Framework" Version="2023.1012.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2023.1003.0" />
<PackageReference Include="Sentry" Version="3.39.1" />
<PackageReference Include="SharpCompress" Version="0.33.0" />
Expand Down
2 changes: 1 addition & 1 deletion osu.iOS.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
<RuntimeIdentifier>iossimulator-x64</RuntimeIdentifier>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Framework.iOS" Version="2023.1006.0" />
<PackageReference Include="ppy.osu.Framework.iOS" Version="2023.1012.0" />
</ItemGroup>
</Project>

0 comments on commit d2044fc

Please sign in to comment.