mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 11:02:54 +08:00
Fix column lights positioned incorrectly
This commit is contained in:
parent
af408d511f
commit
ff2c5b446e
@ -42,6 +42,10 @@ namespace osu.Game.Rulesets.Mania.Skinning
|
||||
bool hasRightLine = rightLineWidth > 0 && skin.GetConfig<LegacySkinConfiguration.LegacySetting, decimal>(LegacySkinConfiguration.LegacySetting.Version)?.Value >= 2.4m
|
||||
|| Stage == null || Column.Index == Stage.Columns.Count - 1;
|
||||
|
||||
float lightPosition = skin.GetConfig<LegacyManiaSkinConfigurationLookup, float>(
|
||||
new LegacyManiaSkinConfigurationLookup(Stage?.Columns.Count ?? 4, LegacyManiaSkinConfigurationLookups.LightPosition))?.Value
|
||||
?? 0;
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
@ -67,6 +71,7 @@ namespace osu.Game.Rulesets.Mania.Skinning
|
||||
{
|
||||
Origin = Anchor.BottomCentre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Bottom = lightPosition },
|
||||
Child = light = new Sprite
|
||||
{
|
||||
Anchor = Anchor.BottomCentre,
|
||||
|
@ -14,6 +14,7 @@ namespace osu.Game.Skinning
|
||||
public readonly float[] ColumnWidth;
|
||||
|
||||
public float HitPosition = 124.8f; // (480 - 402) * 1.6f
|
||||
public float LightPosition = 107.2f; // (480 - 413) * 1.6f
|
||||
public bool ShowJudgementLine = true;
|
||||
|
||||
public LegacyManiaSkinConfiguration(int keys)
|
||||
|
@ -25,6 +25,7 @@ namespace osu.Game.Skinning
|
||||
LeftLineWidth,
|
||||
RightLineWidth,
|
||||
HitPosition,
|
||||
LightPosition,
|
||||
HitTargetImage,
|
||||
ShowJudgementLine,
|
||||
KeyImage,
|
||||
|
@ -91,6 +91,10 @@ namespace osu.Game.Skinning
|
||||
currentConfig.HitPosition = (480 - float.Parse(pair.Value, CultureInfo.InvariantCulture)) * size_scale_factor;
|
||||
break;
|
||||
|
||||
case "LightPosition":
|
||||
currentConfig.LightPosition = (480 - float.Parse(pair.Value, CultureInfo.InvariantCulture)) * size_scale_factor;
|
||||
break;
|
||||
|
||||
case "JudgementLine":
|
||||
currentConfig.ShowJudgementLine = pair.Value == "1";
|
||||
break;
|
||||
|
@ -141,6 +141,9 @@ namespace osu.Game.Skinning
|
||||
case LegacyManiaSkinConfigurationLookups.HitPosition:
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.HitPosition));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.LightPosition:
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.LightPosition));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.ShowJudgementLine:
|
||||
return SkinUtils.As<TValue>(new Bindable<bool>(existing.ShowJudgementLine));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user