mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 04:52:53 +08: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[] ColumnSpacing;
|
||||||
public readonly float[] ColumnWidth;
|
public readonly float[] ColumnWidth;
|
||||||
public readonly float[] ExplosionWidth;
|
public readonly float[] ExplosionWidth;
|
||||||
|
public readonly float[] HoldNoteLightWidth;
|
||||||
|
|
||||||
public float HitPosition = (480 - 402) * POSITION_SCALE_FACTOR;
|
public float HitPosition = (480 - 402) * POSITION_SCALE_FACTOR;
|
||||||
public float LightPosition = (480 - 413) * POSITION_SCALE_FACTOR;
|
public float LightPosition = (480 - 413) * POSITION_SCALE_FACTOR;
|
||||||
@ -44,6 +45,7 @@ namespace osu.Game.Skinning
|
|||||||
ColumnSpacing = new float[keys - 1];
|
ColumnSpacing = new float[keys - 1];
|
||||||
ColumnWidth = new float[keys];
|
ColumnWidth = new float[keys];
|
||||||
ExplosionWidth = new float[keys];
|
ExplosionWidth = new float[keys];
|
||||||
|
HoldNoteLightWidth = new float[keys];
|
||||||
|
|
||||||
ColumnLineWidth.AsSpan().Fill(2);
|
ColumnLineWidth.AsSpan().Fill(2);
|
||||||
ColumnWidth.AsSpan().Fill(DEFAULT_COLUMN_SIZE);
|
ColumnWidth.AsSpan().Fill(DEFAULT_COLUMN_SIZE);
|
||||||
|
@ -34,6 +34,8 @@ namespace osu.Game.Skinning
|
|||||||
HoldNoteHeadImage,
|
HoldNoteHeadImage,
|
||||||
HoldNoteTailImage,
|
HoldNoteTailImage,
|
||||||
HoldNoteBodyImage,
|
HoldNoteBodyImage,
|
||||||
|
HoldNoteLightImage,
|
||||||
|
HoldNoteLightScale,
|
||||||
ExplosionImage,
|
ExplosionImage,
|
||||||
ExplosionScale,
|
ExplosionScale,
|
||||||
ColumnLineColour,
|
ColumnLineColour,
|
||||||
|
@ -101,6 +101,10 @@ namespace osu.Game.Skinning
|
|||||||
parseArrayValue(pair.Value, currentConfig.ExplosionWidth);
|
parseArrayValue(pair.Value, currentConfig.ExplosionWidth);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "LightingLWidth":
|
||||||
|
parseArrayValue(pair.Value, currentConfig.HoldNoteLightWidth);
|
||||||
|
break;
|
||||||
|
|
||||||
case "WidthForNoteHeightScale":
|
case "WidthForNoteHeightScale":
|
||||||
float minWidth = float.Parse(pair.Value, CultureInfo.InvariantCulture) * LegacyManiaSkinConfiguration.POSITION_SCALE_FACTOR;
|
float minWidth = float.Parse(pair.Value, CultureInfo.InvariantCulture) * LegacyManiaSkinConfiguration.POSITION_SCALE_FACTOR;
|
||||||
if (minWidth > 0)
|
if (minWidth > 0)
|
||||||
|
@ -220,6 +220,20 @@ namespace osu.Game.Skinning
|
|||||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||||
return SkinUtils.As<TValue>(getManiaImage(existing, $"NoteImage{maniaLookup.TargetColumn}L"));
|
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:
|
case LegacyManiaSkinConfigurationLookups.KeyImage:
|
||||||
Debug.Assert(maniaLookup.TargetColumn != null);
|
Debug.Assert(maniaLookup.TargetColumn != null);
|
||||||
return SkinUtils.As<TValue>(getManiaImage(existing, $"KeyImage{maniaLookup.TargetColumn}"));
|
return SkinUtils.As<TValue>(getManiaImage(existing, $"KeyImage{maniaLookup.TargetColumn}"));
|
||||||
|
Loading…
Reference in New Issue
Block a user