mirror of https://github.com/ppy/osu
Add local preserving container to OsuTestScene to ensure correc… (#6805)
Add local preserving container to OsuTestScene to ensure correct test dimensions
This commit is contained in:
commit
0113ab5e56
|
@ -10,6 +10,8 @@
|
|||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Track;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Framework.Testing;
|
||||
|
@ -93,6 +95,10 @@ protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnl
|
|||
return Dependencies;
|
||||
}
|
||||
|
||||
protected override Container<Drawable> Content => content ?? base.Content;
|
||||
|
||||
private readonly Container content;
|
||||
|
||||
protected OsuTestScene()
|
||||
{
|
||||
localStorage = new Lazy<Storage>(() => new NativeStorage($"{GetType().Name}-{Guid.NewGuid()}"));
|
||||
|
@ -104,6 +110,8 @@ protected OsuTestScene()
|
|||
usage.Migrate();
|
||||
return factory;
|
||||
});
|
||||
|
||||
base.Content.Add(content = new DrawSizePreservingFillContainer());
|
||||
}
|
||||
|
||||
[Resolved]
|
||||
|
|
Loading…
Reference in New Issue