mirror of
https://github.com/ppy/osu
synced 2025-01-03 12:52:10 +00:00
Ensure the correct (up-to-date) ruleset is retrieved
This commit is contained in:
parent
2c840c52a3
commit
0a340bac5a
@ -15,5 +15,7 @@ namespace osu.Game.Rulesets.Catch.Tests
|
|||||||
typeof(CatchRuleset),
|
typeof(CatchRuleset),
|
||||||
typeof(CatchLegacySkinTransformer),
|
typeof(CatchLegacySkinTransformer),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
protected override Ruleset CreateRulesetForSkinProvider() => new CatchRuleset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,8 @@ namespace osu.Game.Rulesets.Mania.Tests.Skinning
|
|||||||
typeof(ManiaLegacySkinTransformer),
|
typeof(ManiaLegacySkinTransformer),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
protected override Ruleset CreateRulesetForSkinProvider() => new ManiaRuleset();
|
||||||
|
|
||||||
protected ManiaSkinnableTestScene()
|
protected ManiaSkinnableTestScene()
|
||||||
{
|
{
|
||||||
scrollingInfo.Direction.Value = ScrollingDirection.Down;
|
scrollingInfo.Direction.Value = ScrollingDirection.Down;
|
||||||
|
@ -15,5 +15,7 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
typeof(OsuRuleset),
|
typeof(OsuRuleset),
|
||||||
typeof(OsuLegacySkinTransformer),
|
typeof(OsuLegacySkinTransformer),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
protected override Ruleset CreateRulesetForSkinProvider() => new OsuRuleset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ using osu.Framework.Graphics.Textures;
|
|||||||
using osu.Framework.IO.Stores;
|
using osu.Framework.IO.Stores;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
@ -34,6 +35,9 @@ namespace osu.Game.Tests.Visual
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Required to be part of the per-ruleset implementation to construct the newer version of the Ruleset.
|
||||||
|
protected abstract Ruleset CreateRulesetForSkinProvider();
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(AudioManager audio, SkinManager skinManager)
|
private void load(AudioManager audio, SkinManager skinManager)
|
||||||
{
|
{
|
||||||
@ -106,7 +110,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
{
|
{
|
||||||
new OutlineBox { Alpha = autoSize ? 1 : 0 },
|
new OutlineBox { Alpha = autoSize ? 1 : 0 },
|
||||||
mainProvider.WithChild(
|
mainProvider.WithChild(
|
||||||
new SkinProvidingContainer(Ruleset.Value.CreateInstance().CreateLegacySkinProvider(mainProvider, beatmap))
|
new SkinProvidingContainer(CreateRulesetForSkinProvider().CreateLegacySkinProvider(mainProvider, beatmap))
|
||||||
{
|
{
|
||||||
Child = created,
|
Child = created,
|
||||||
RelativeSizeAxes = !autoSize ? Axes.Both : Axes.None,
|
RelativeSizeAxes = !autoSize ? Axes.Both : Axes.None,
|
||||||
|
Loading…
Reference in New Issue
Block a user