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