1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-08 22:04:47 +08:00

move skin component logic

This commit is contained in:
Sheepposu
2024-02-20 22:28:25 -05:00
Unverified
parent 288eed53df
commit 1d552e7c90
2 changed files with 22 additions and 22 deletions
@@ -29,6 +29,28 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
return new DefaultJudgementPieceSliderTickMiss(result);
}
break;
case OsuSkinComponentLookup osuComponent:
switch (osuComponent.Component)
{
case OsuSkinComponents.HitMarkerLeft:
if (GetTexture(@"hitmarker-left") != null)
return new HitMarker(OsuAction.LeftButton);
return null;
case OsuSkinComponents.HitMarkerRight:
if (GetTexture(@"hitmarker-right") != null)
return new HitMarker(OsuAction.RightButton);
return null;
case OsuSkinComponents.AimMarker:
if (GetTexture(@"aimmarker") != null)
return new HitMarker();
return null;
}
break;
}
@@ -5,7 +5,6 @@ using System;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.Skinning.Default;
using osu.Game.Skinning;
using osuTK;
@@ -168,27 +167,6 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
return new LegacyApproachCircle();
return null;
case OsuSkinComponents.HitMarkerLeft:
if (GetTexture(@"hitmarker-left") != null)
return new HitMarker(OsuAction.LeftButton);
return null;
case OsuSkinComponents.HitMarkerRight:
if (GetTexture(@"hitmarker-right") != null)
return new HitMarker(OsuAction.RightButton);
return null;
case OsuSkinComponents.AimMarker:
if (GetTexture(@"aimmarker") != null)
return new HitMarker();
return null;
default:
throw new UnsupportedSkinComponentException(lookup);
}
}