mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 23:24:04 +09:00
Rename ISkinComponent
to ISkinLookup
This commit is contained in:
@ -14,14 +14,14 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
|
||||
{
|
||||
}
|
||||
|
||||
public override Drawable? GetDrawableComponent(ISkinComponent component)
|
||||
public override Drawable? GetDrawableComponent(ISkinLookup lookup)
|
||||
{
|
||||
switch (component)
|
||||
switch (lookup)
|
||||
{
|
||||
case GameplaySkinComponent<HitResult> resultComponent:
|
||||
case GameplaySkinLookup<HitResult> resultComponent:
|
||||
return new ArgonJudgementPiece(resultComponent.Component);
|
||||
|
||||
case OsuSkinComponent osuComponent:
|
||||
case OsuSkinLookup osuComponent:
|
||||
// TODO: Once everything is finalised, consider throwing UnsupportedSkinComponentException on missing entries.
|
||||
switch (osuComponent.Component)
|
||||
{
|
||||
@ -62,7 +62,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
|
||||
break;
|
||||
}
|
||||
|
||||
return base.GetDrawableComponent(component);
|
||||
return base.GetDrawableComponent(lookup);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -35,9 +35,9 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
|
||||
accentColour.BindValueChanged(colour => Colour = colour.NewValue, true);
|
||||
}
|
||||
|
||||
protected override Drawable CreateDefault(ISkinComponent component)
|
||||
protected override Drawable CreateDefault(ISkinLookup lookup)
|
||||
{
|
||||
var drawable = base.CreateDefault(component);
|
||||
var drawable = base.CreateDefault(lookup);
|
||||
|
||||
// Although this is a non-legacy component, osu-resources currently stores approach circle as a legacy-like texture.
|
||||
// See LegacyApproachCircle for documentation as to why this is required.
|
||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
|
||||
Colour = Color4.White.Opacity(0.5f),
|
||||
},
|
||||
},
|
||||
number = new SkinnableSpriteText(new OsuSkinComponent(OsuSkinComponents.HitCircleText), _ => new OsuSpriteText
|
||||
number = new SkinnableSpriteText(new OsuSkinLookup(OsuSkinComponents.HitCircleText), _ => new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.Numeric.With(size: 40),
|
||||
UseFullGlyphHeight = false,
|
||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
|
||||
|
||||
Size = new Vector2(OsuHitObject.OBJECT_RADIUS * 2);
|
||||
|
||||
Child = new SkinnableDrawable(new OsuSkinComponent(OsuSkinComponents.ReverseArrow), _ => new SpriteIcon
|
||||
Child = new SkinnableDrawable(new OsuSkinLookup(OsuSkinComponents.ReverseArrow), _ => new SpriteIcon
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Blending = BlendingParameters.Additive,
|
||||
|
@ -35,9 +35,9 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
accentColour.BindValueChanged(colour => Colour = LegacyColourCompatibility.DisallowZeroAlpha(colour.NewValue), true);
|
||||
}
|
||||
|
||||
protected override Drawable CreateDefault(ISkinComponent component)
|
||||
protected override Drawable CreateDefault(ISkinLookup lookup)
|
||||
{
|
||||
var drawable = base.CreateDefault(component);
|
||||
var drawable = base.CreateDefault(lookup);
|
||||
|
||||
// account for the sprite being used for the default approach circle being taken from stable,
|
||||
// when hitcircles have 5px padding on each size. this should be removed if we update the sprite.
|
||||
|
@ -87,7 +87,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
|
||||
if (hasNumber)
|
||||
{
|
||||
OverlayLayer.Add(hitCircleText = new SkinnableSpriteText(new OsuSkinComponent(OsuSkinComponents.HitCircleText), _ => new OsuSpriteText
|
||||
OverlayLayer.Add(hitCircleText = new SkinnableSpriteText(new OsuSkinLookup(OsuSkinComponents.HitCircleText), _ => new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.Numeric.With(size: 40),
|
||||
UseFullGlyphHeight = false,
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
|
||||
string lookupName = new OsuSkinComponent(OsuSkinComponents.ReverseArrow).LookupName;
|
||||
string lookupName = new OsuSkinLookup(OsuSkinComponents.ReverseArrow).LookupName;
|
||||
|
||||
var skin = skinSource.FindProvider(s => s.GetTexture(lookupName) != null);
|
||||
InternalChild = skin?.GetAnimation(lookupName, true, true) ?? Empty();
|
||||
|
@ -28,17 +28,17 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
hasHitCircle = new Lazy<bool>(() => GetTexture("hitcircle") != null);
|
||||
}
|
||||
|
||||
public override Drawable? GetDrawableComponent(ISkinComponent component)
|
||||
public override Drawable? GetDrawableComponent(ISkinLookup lookup)
|
||||
{
|
||||
if (component is OsuSkinComponent osuComponent)
|
||||
if (lookup is OsuSkinLookup osuComponent)
|
||||
{
|
||||
switch (osuComponent.Component)
|
||||
{
|
||||
case OsuSkinComponents.FollowPoint:
|
||||
return this.GetAnimation(component.LookupName, true, true, true, startAtCurrentTime: false);
|
||||
return this.GetAnimation(lookup.LookupName, true, true, true, startAtCurrentTime: false);
|
||||
|
||||
case OsuSkinComponents.SliderScorePoint:
|
||||
return this.GetAnimation(component.LookupName, false, false);
|
||||
return this.GetAnimation(lookup.LookupName, false, false);
|
||||
|
||||
case OsuSkinComponents.SliderFollowCircle:
|
||||
var followCircleContent = this.GetAnimation("sliderfollowcircle", true, true, true);
|
||||
@ -136,11 +136,11 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
return new LegacyApproachCircle();
|
||||
|
||||
default:
|
||||
throw new UnsupportedSkinComponentException(component);
|
||||
throw new UnsupportedSkinComponentException(lookup);
|
||||
}
|
||||
}
|
||||
|
||||
return base.GetDrawableComponent(component);
|
||||
return base.GetDrawableComponent(lookup);
|
||||
}
|
||||
|
||||
public override IBindable<TValue>? GetConfig<TLookup, TValue>(TLookup lookup)
|
||||
|
Reference in New Issue
Block a user