mirror of
https://github.com/osukey/osukey.git
synced 2025-05-06 06:07:26 +09: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.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Rulesets.Mania.UI;
|
using osu.Game.Rulesets.Mania.UI;
|
||||||
using osu.Game.Rulesets.UI.Scrolling;
|
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
|
new LegacyManiaSkinConfigurationLookup(stage?.Columns.Count ?? 4, LegacyManiaSkinConfigurationLookups.HitTargetImage))?.Value
|
||||||
?? "mania-stage-hint";
|
?? "mania-stage-hint";
|
||||||
|
|
||||||
|
bool showJudgementLine = skin.GetConfig<LegacyManiaSkinConfigurationLookup, bool>(
|
||||||
|
new LegacyManiaSkinConfigurationLookup(stage?.Columns.Count ?? 4, LegacyManiaSkinConfigurationLookups.ShowJudgementLine))?.Value
|
||||||
|
?? true;
|
||||||
|
|
||||||
InternalChild = directionContainer = new Container
|
InternalChild = directionContainer = new Container
|
||||||
{
|
{
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
Child = new Sprite
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
Texture = skin.GetTexture(targetImage),
|
new Sprite
|
||||||
Scale = new Vector2(1, 0.9f * 1.6025f),
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
Texture = skin.GetTexture(targetImage),
|
||||||
Width = 1
|
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 readonly float[] ColumnWidth;
|
||||||
|
|
||||||
public float HitPosition = 124.8f; // (480 - 402) * 1.6f
|
public float HitPosition = 124.8f; // (480 - 402) * 1.6f
|
||||||
|
public bool ShowJudgementLine = true;
|
||||||
|
|
||||||
public LegacyManiaSkinConfiguration(int keys)
|
public LegacyManiaSkinConfiguration(int keys)
|
||||||
{
|
{
|
||||||
|
@ -20,6 +20,7 @@ namespace osu.Game.Skinning
|
|||||||
public enum LegacyManiaSkinConfigurationLookups
|
public enum LegacyManiaSkinConfigurationLookups
|
||||||
{
|
{
|
||||||
HitPosition,
|
HitPosition,
|
||||||
HitTargetImage
|
HitTargetImage,
|
||||||
|
ShowJudgementLine
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -90,6 +90,10 @@ namespace osu.Game.Skinning
|
|||||||
case "HitPosition":
|
case "HitPosition":
|
||||||
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 "JudgementLine":
|
||||||
|
currentConfig.ShowJudgementLine = pair.Value == "1";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -131,6 +131,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.ShowJudgementLine:
|
||||||
|
return SkinUtils.As<TValue>(new Bindable<bool>(existing.ShowJudgementLine));
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user