mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:17:23 +08:00
simplify implementation and adjust the default values
This commit is contained in:
parent
2108844319
commit
3741c2339a
@ -1,40 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using osu.Framework.Graphics;
|
||||
|
||||
namespace osu.Game.Rulesets.Mania.UI
|
||||
{
|
||||
public class DrawableManiaJudgementAdjustmentContainer : JudgementContainer<DrawableManiaJudgement>
|
||||
{
|
||||
private float hitTargetPosition = 110;
|
||||
private float scorePosition;
|
||||
|
||||
public float HitTargetPosition
|
||||
{
|
||||
get => hitTargetPosition;
|
||||
set
|
||||
{
|
||||
hitTargetPosition = value;
|
||||
Y = value + scorePosition + 150;
|
||||
}
|
||||
}
|
||||
|
||||
public float ScorePosition
|
||||
{
|
||||
set
|
||||
{
|
||||
scorePosition = value;
|
||||
Y = hitTargetPosition + value + 150;
|
||||
}
|
||||
}
|
||||
|
||||
public DrawableManiaJudgementAdjustmentContainer()
|
||||
{
|
||||
Anchor = Anchor.TopCentre;
|
||||
Origin = Anchor.Centre;
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
}
|
||||
}
|
||||
}
|
@ -33,7 +33,7 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
public IReadOnlyList<Column> Columns => columnFlow.Content;
|
||||
private readonly ColumnFlow<Column> columnFlow;
|
||||
|
||||
private DrawableManiaJudgementAdjustmentContainer judgements;
|
||||
private JudgementContainer<DrawableManiaJudgement> judgements;
|
||||
private readonly DrawablePool<DrawableManiaJudgement> judgementPool;
|
||||
|
||||
private readonly Drawable barLineContainer;
|
||||
@ -102,9 +102,11 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
},
|
||||
judgements = new DrawableManiaJudgementAdjustmentContainer()
|
||||
judgements = new JudgementContainer<DrawableManiaJudgement>()
|
||||
{
|
||||
HitTargetPosition = HIT_TARGET_POSITION,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.Centre,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
},
|
||||
topLevelContainer = new Container { RelativeSizeAxes = Axes.Both }
|
||||
}
|
||||
@ -181,8 +183,8 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
|
||||
protected override void OnSkinChanged()
|
||||
{
|
||||
judgements.ScorePosition = CurrentSkin.GetManiaSkinConfig<float>(LegacyManiaSkinConfigurationLookups.ScorePosition)
|
||||
?.Value ?? 0;
|
||||
judgements.Y = CurrentSkin.GetManiaSkinConfig<float>(LegacyManiaSkinConfigurationLookups.ScorePosition)
|
||||
?.Value ?? HIT_TARGET_POSITION + 150;
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Skinning
|
||||
|
||||
public float HitPosition = (480 - 402) * POSITION_SCALE_FACTOR;
|
||||
public float LightPosition = (480 - 413) * POSITION_SCALE_FACTOR;
|
||||
public float ScorePosition = (480 - 300) * POSITION_SCALE_FACTOR;
|
||||
public float ScorePosition = 300 * POSITION_SCALE_FACTOR;
|
||||
public bool ShowJudgementLine = true;
|
||||
public bool KeysUnderNotes;
|
||||
|
||||
|
@ -95,7 +95,7 @@ namespace osu.Game.Skinning
|
||||
break;
|
||||
|
||||
case "ScorePosition":
|
||||
currentConfig.ScorePosition = (480 - float.Parse(pair.Value, CultureInfo.InvariantCulture)) * LegacyManiaSkinConfiguration.POSITION_SCALE_FACTOR;
|
||||
currentConfig.ScorePosition = (float.Parse(pair.Value, CultureInfo.InvariantCulture)) * LegacyManiaSkinConfiguration.POSITION_SCALE_FACTOR;
|
||||
break;
|
||||
|
||||
case "JudgementLine":
|
||||
|
Loading…
Reference in New Issue
Block a user