mirror of
https://github.com/ppy/osu
synced 2025-01-11 08:39:31 +00:00
Add parsing for hold note light/scale
This commit is contained in:
parent
e6116890af
commit
c0c67c11b1
@ -31,6 +31,7 @@ namespace osu.Game.Skinning
|
||||
public readonly float[] ColumnSpacing;
|
||||
public readonly float[] ColumnWidth;
|
||||
public readonly float[] ExplosionWidth;
|
||||
public readonly float[] HoldNoteLightWidth;
|
||||
|
||||
public float HitPosition = (480 - 402) * POSITION_SCALE_FACTOR;
|
||||
public float LightPosition = (480 - 413) * POSITION_SCALE_FACTOR;
|
||||
@ -44,6 +45,7 @@ namespace osu.Game.Skinning
|
||||
ColumnSpacing = new float[keys - 1];
|
||||
ColumnWidth = new float[keys];
|
||||
ExplosionWidth = new float[keys];
|
||||
HoldNoteLightWidth = new float[keys];
|
||||
|
||||
ColumnLineWidth.AsSpan().Fill(2);
|
||||
ColumnWidth.AsSpan().Fill(DEFAULT_COLUMN_SIZE);
|
||||
|
@ -34,6 +34,8 @@ namespace osu.Game.Skinning
|
||||
HoldNoteHeadImage,
|
||||
HoldNoteTailImage,
|
||||
HoldNoteBodyImage,
|
||||
HoldNoteLightImage,
|
||||
HoldNoteLightScale,
|
||||
ExplosionImage,
|
||||
ExplosionScale,
|
||||
ColumnLineColour,
|
||||
|
@ -101,6 +101,10 @@ namespace osu.Game.Skinning
|
||||
parseArrayValue(pair.Value, currentConfig.ExplosionWidth);
|
||||
break;
|
||||
|
||||
case "LightingLWidth":
|
||||
parseArrayValue(pair.Value, currentConfig.HoldNoteLightWidth);
|
||||
break;
|
||||
|
||||
case "WidthForNoteHeightScale":
|
||||
float minWidth = float.Parse(pair.Value, CultureInfo.InvariantCulture) * LegacyManiaSkinConfiguration.POSITION_SCALE_FACTOR;
|
||||
if (minWidth > 0)
|
||||
|
@ -220,6 +220,20 @@ namespace osu.Game.Skinning
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, $"NoteImage{maniaLookup.TargetColumn}L"));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.HoldNoteLightImage:
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, "LightingL"));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.HoldNoteLightScale:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
|
||||
if (GetConfig<LegacySkinConfiguration.LegacySetting, decimal>(LegacySkinConfiguration.LegacySetting.Version)?.Value < 2.5m)
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(1));
|
||||
|
||||
if (existing.HoldNoteLightWidth[maniaLookup.TargetColumn.Value] != 0)
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.HoldNoteLightWidth[maniaLookup.TargetColumn.Value] / LegacyManiaSkinConfiguration.DEFAULT_COLUMN_SIZE));
|
||||
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.ColumnWidth[maniaLookup.TargetColumn.Value] / LegacyManiaSkinConfiguration.DEFAULT_COLUMN_SIZE));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.KeyImage:
|
||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||
return SkinUtils.As<TValue>(getManiaImage(existing, $"KeyImage{maniaLookup.TargetColumn}"));
|
||||
|
Loading…
Reference in New Issue
Block a user