mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Rename ISkinComponent
to ISkinLookup
This commit is contained in:
@ -5,13 +5,13 @@ using osu.Game.Skinning;
|
||||
|
||||
namespace osu.Game.Rulesets.Mania
|
||||
{
|
||||
public class ManiaSkinComponent : GameplaySkinComponent<ManiaSkinComponents>
|
||||
public class ManiaSkinLookup : GameplaySkinLookup<ManiaSkinComponents>
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="ManiaSkinComponent"/>.
|
||||
/// Creates a new <see cref="ManiaSkinLookup"/>.
|
||||
/// </summary>
|
||||
/// <param name="component">The component.</param>
|
||||
public ManiaSkinComponent(ManiaSkinComponents component)
|
||||
public ManiaSkinLookup(ManiaSkinComponents component)
|
||||
: base(component)
|
||||
{
|
||||
}
|
@ -105,7 +105,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
headContainer = new Container<DrawableHoldNoteHead> { RelativeSizeAxes = Axes.Both }
|
||||
}
|
||||
},
|
||||
bodyPiece = new SkinnableDrawable(new ManiaSkinComponent(ManiaSkinComponents.HoldNoteBody), _ => new DefaultBodyPiece
|
||||
bodyPiece = new SkinnableDrawable(new ManiaSkinLookup(ManiaSkinComponents.HoldNoteBody), _ => new DefaultBodyPiece
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
})
|
||||
|
@ -54,7 +54,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
{
|
||||
rulesetConfig?.BindWith(ManiaRulesetSetting.TimingBasedNoteColouring, configTimingBasedNoteColouring);
|
||||
|
||||
AddInternal(headPiece = new SkinnableDrawable(new ManiaSkinComponent(Component), _ => new DefaultNotePiece())
|
||||
AddInternal(headPiece = new SkinnableDrawable(new ManiaSkinLookup(Component), _ => new DefaultNotePiece())
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y
|
||||
|
@ -22,14 +22,14 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
|
||||
this.beatmap = (ManiaBeatmap)beatmap;
|
||||
}
|
||||
|
||||
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 ManiaSkinComponent maniaComponent:
|
||||
case ManiaSkinLookup maniaComponent:
|
||||
// TODO: Once everything is finalised, consider throwing UnsupportedSkinComponentException on missing entries.
|
||||
switch (maniaComponent.Component)
|
||||
{
|
||||
@ -62,7 +62,7 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
|
||||
break;
|
||||
}
|
||||
|
||||
return base.GetDrawableComponent(component);
|
||||
return base.GetDrawableComponent(lookup);
|
||||
}
|
||||
|
||||
public override IBindable<TValue>? GetConfig<TLookup, TValue>(TLookup lookup)
|
||||
|
@ -74,14 +74,14 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
|
||||
});
|
||||
}
|
||||
|
||||
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 getResult(resultComponent.Component);
|
||||
|
||||
case ManiaSkinComponent maniaComponent:
|
||||
case ManiaSkinLookup maniaComponent:
|
||||
if (!isLegacySkin.Value || !hasKeyTexture.Value)
|
||||
return null;
|
||||
|
||||
@ -120,11 +120,11 @@ namespace osu.Game.Rulesets.Mania.Skinning.Legacy
|
||||
return new LegacyStageForeground();
|
||||
|
||||
default:
|
||||
throw new UnsupportedSkinComponentException(component);
|
||||
throw new UnsupportedSkinComponentException(lookup);
|
||||
}
|
||||
}
|
||||
|
||||
return base.GetDrawableComponent(component);
|
||||
return base.GetDrawableComponent(lookup);
|
||||
}
|
||||
|
||||
private Drawable getResult(HitResult result)
|
||||
|
@ -76,7 +76,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
skin.SourceChanged += onSourceChanged;
|
||||
onSourceChanged();
|
||||
|
||||
Drawable background = new SkinnableDrawable(new ManiaSkinComponent(ManiaSkinComponents.ColumnBackground), _ => new DefaultColumnBackground())
|
||||
Drawable background = new SkinnableDrawable(new ManiaSkinLookup(ManiaSkinComponents.ColumnBackground), _ => new DefaultColumnBackground())
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
};
|
||||
@ -88,7 +88,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
// For input purposes, the background is added at the highest depth, but is then proxied back below all other elements
|
||||
background.CreateProxy(),
|
||||
HitObjectArea,
|
||||
keyArea = new SkinnableDrawable(new ManiaSkinComponent(ManiaSkinComponents.KeyArea), _ => new DefaultKeyArea())
|
||||
keyArea = new SkinnableDrawable(new ManiaSkinLookup(ManiaSkinComponents.KeyArea), _ => new DefaultKeyArea())
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
},
|
||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Rulesets.Mania.UI.Components
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Depth = 2,
|
||||
},
|
||||
hitTarget = new SkinnableDrawable(new ManiaSkinComponent(ManiaSkinComponents.HitTarget), _ => new DefaultHitTarget())
|
||||
hitTarget = new SkinnableDrawable(new ManiaSkinLookup(ManiaSkinComponents.HitTarget), _ => new DefaultHitTarget())
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Depth = 1
|
||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
InternalChild = skinnableExplosion = new SkinnableDrawable(new ManiaSkinComponent(ManiaSkinComponents.HitExplosion), _ => new DefaultHitExplosion())
|
||||
InternalChild = skinnableExplosion = new SkinnableDrawable(new ManiaSkinLookup(ManiaSkinComponents.HitExplosion), _ => new DefaultHitExplosion())
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
};
|
||||
|
@ -73,7 +73,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
AutoSizeAxes = Axes.X,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SkinnableDrawable(new ManiaSkinComponent(ManiaSkinComponents.StageBackground), _ => new DefaultStageBackground())
|
||||
new SkinnableDrawable(new ManiaSkinLookup(ManiaSkinComponents.StageBackground), _ => new DefaultStageBackground())
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
},
|
||||
@ -98,7 +98,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
}
|
||||
},
|
||||
new SkinnableDrawable(new ManiaSkinComponent(ManiaSkinComponents.StageForeground), _ => null)
|
||||
new SkinnableDrawable(new ManiaSkinLookup(ManiaSkinComponents.StageForeground), _ => null)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
},
|
||||
|
Reference in New Issue
Block a user