mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 16:12:54 +08:00
Add missing judgement line
This commit is contained in:
parent
02237133cb
commit
71387016b2
@ -5,6 +5,7 @@ using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Rulesets.Mania.UI;
|
||||
using osu.Game.Rulesets.UI.Scrolling;
|
||||
@ -34,17 +35,31 @@ namespace osu.Game.Rulesets.Mania.Skinning
|
||||
new LegacyManiaSkinConfigurationLookup(stage?.Columns.Count ?? 4, LegacyManiaSkinConfigurationLookups.HitTargetImage))?.Value
|
||||
?? "mania-stage-hint";
|
||||
|
||||
bool showJudgementLine = skin.GetConfig<LegacyManiaSkinConfigurationLookup, bool>(
|
||||
new LegacyManiaSkinConfigurationLookup(stage?.Columns.Count ?? 4, LegacyManiaSkinConfigurationLookups.ShowJudgementLine))?.Value
|
||||
?? true;
|
||||
|
||||
InternalChild = directionContainer = new Container
|
||||
{
|
||||
Origin = Anchor.CentreLeft,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
Child = new Sprite
|
||||
Children = new Drawable[]
|
||||
{
|
||||
Texture = skin.GetTexture(targetImage),
|
||||
Scale = new Vector2(1, 0.9f * 1.6025f),
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Width = 1
|
||||
new Sprite
|
||||
{
|
||||
Texture = skin.GetTexture(targetImage),
|
||||
Scale = new Vector2(1, 0.9f * 1.6025f),
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Width = 1
|
||||
},
|
||||
new Box
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = 1,
|
||||
Alpha = showJudgementLine ? 0.9f : 0
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -14,6 +14,7 @@ namespace osu.Game.Skinning
|
||||
public readonly float[] ColumnWidth;
|
||||
|
||||
public float HitPosition = 124.8f; // (480 - 402) * 1.6f
|
||||
public bool ShowJudgementLine = true;
|
||||
|
||||
public LegacyManiaSkinConfiguration(int keys)
|
||||
{
|
||||
|
@ -20,6 +20,7 @@ namespace osu.Game.Skinning
|
||||
public enum LegacyManiaSkinConfigurationLookups
|
||||
{
|
||||
HitPosition,
|
||||
HitTargetImage
|
||||
HitTargetImage,
|
||||
ShowJudgementLine
|
||||
}
|
||||
}
|
||||
|
@ -90,6 +90,10 @@ namespace osu.Game.Skinning
|
||||
case "HitPosition":
|
||||
currentConfig.HitPosition = (480 - float.Parse(pair.Value, CultureInfo.InvariantCulture)) * size_scale_factor;
|
||||
break;
|
||||
|
||||
case "JudgementLine":
|
||||
currentConfig.ShowJudgementLine = pair.Value == "1";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,6 +131,9 @@ namespace osu.Game.Skinning
|
||||
{
|
||||
case LegacyManiaSkinConfigurationLookups.HitPosition:
|
||||
return SkinUtils.As<TValue>(new Bindable<float>(existing.HitPosition));
|
||||
|
||||
case LegacyManiaSkinConfigurationLookups.ShowJudgementLine:
|
||||
return SkinUtils.As<TValue>(new Bindable<bool>(existing.ShowJudgementLine));
|
||||
}
|
||||
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user