mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Fix catch catcher lookups (#5964)
Fix catch catcher lookups Co-authored-by: null <27856297+dependabot-preview[bot]@users.noreply.github.com>
This commit is contained in:
@ -19,11 +19,23 @@ namespace osu.Game.Skinning
|
||||
[Resolved]
|
||||
private TextureStore textures { get; set; }
|
||||
|
||||
public SkinnableSprite(ISkinComponent component, Func<ISkinSource, bool> allowFallback = null, ConfineMode confineMode = ConfineMode.ScaleDownToFit)
|
||||
: base(component, allowFallback, confineMode)
|
||||
public SkinnableSprite(string textureName, Func<ISkinSource, bool> allowFallback = null, ConfineMode confineMode = ConfineMode.ScaleDownToFit)
|
||||
: base(new SpriteComponent(textureName), allowFallback, confineMode)
|
||||
{
|
||||
}
|
||||
|
||||
protected override Drawable CreateDefault(ISkinComponent component) => new Sprite { Texture = textures.Get(component.LookupName) };
|
||||
|
||||
private class SpriteComponent : ISkinComponent
|
||||
{
|
||||
private readonly string textureName;
|
||||
|
||||
public SpriteComponent(string textureName)
|
||||
{
|
||||
this.textureName = textureName;
|
||||
}
|
||||
|
||||
public string LookupName => textureName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.2.6" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.903.0" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2019.903.1" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2019.830.1" />
|
||||
<PackageReference Include="SharpCompress" Version="0.24.0" />
|
||||
<PackageReference Include="NUnit" Version="3.12.0" />
|
||||
|
Reference in New Issue
Block a user