1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 00:47:24 +08:00

removed unnecessary variable

and fixed the test because of new DI letting it fail
This commit is contained in:
Aergwyn 2017-12-09 13:39:11 +01:00
parent 114604a642
commit cdf9ea0d01
2 changed files with 21 additions and 9 deletions

View File

@ -1,6 +1,8 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics.Containers;
using osu.Game.Overlays;
namespace osu.Game.Tests.Visual
@ -8,16 +10,30 @@ namespace osu.Game.Tests.Visual
internal class TestCaseSettings : OsuTestCase
{
private readonly SettingsOverlay settings;
private readonly DialogOverlay dialogOverlay;
private DependencyContainer dependencies;
protected override IReadOnlyDependencyContainer CreateLocalDependencies(IReadOnlyDependencyContainer parent) => dependencies = new DependencyContainer(parent);
public TestCaseSettings()
{
Children = new[] { settings = new MainSettings() };
settings = new MainSettings
{
State = Visibility.Visible
};
Add(dialogOverlay = new DialogOverlay
{
Depth = -1
});
}
protected override void LoadComplete()
[BackgroundDependencyLoader]
private void load()
{
base.LoadComplete();
settings.ToggleVisibility();
dependencies.Cache(dialogOverlay);
Add(settings);
}
}
}

View File

@ -17,15 +17,11 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
private TriangleButton deleteButton;
private TriangleButton restoreButton;
private DialogOverlay dialogOverlay;
protected override string Header => "General";
[BackgroundDependencyLoader]
private void load(BeatmapManager beatmaps, DialogOverlay dialog)
private void load(BeatmapManager beatmaps, DialogOverlay dialogOverlay)
{
dialogOverlay = dialog;
Children = new Drawable[]
{
importButton = new SettingsButton