1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 04:13:00 +08:00

remove rolling duration, fix issue with loading

This commit is contained in:
mk56-spn 2022-12-14 23:00:34 +01:00
parent edb46e422c
commit 9a235b3213
4 changed files with 10 additions and 14 deletions

View File

@ -112,8 +112,6 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
{
protected override OsuSpriteText CreateSpriteText()
=> base.CreateSpriteText().With(s => s.Font = s.Font.With(fixedWidth: true, size: 16));
protected override double RollingDuration => 750;
}
}
}

View File

@ -33,9 +33,10 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
[Resolved]
private JudgementTally tally { get; set; } = null!;
protected FillFlowContainer JudgementContainer;
protected FillFlowContainer JudgementContainer = null!;
public JudgementCounterDisplay()
[BackgroundDependencyLoader]
private void load()
{
AutoSizeAxes = Axes.Both;
InternalChild = JudgementContainer = new FillFlowContainer
@ -44,17 +45,15 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
Spacing = new Vector2(10),
AutoSizeAxes = Axes.Both
};
}
protected override void LoadComplete()
{
//Adding this in "load" will cause the component to not load in properly after the first beatmap attempt. Or after existing and reentering.
//this does not happen in tests, or in the skin editor component preview button.
foreach (var result in tally.Results)
{
JudgementContainer.Add(createCounter(result));
}
}
protected override void LoadComplete()
{
base.LoadComplete();
FlowDirection.BindValueChanged(direction =>

View File

@ -34,19 +34,17 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
protected override void LoadComplete()
{
base.LoadComplete();
scoreProcessor.NewJudgement += judgement =>
{
foreach (JudgementCounterInfo result in Results.Where(result => result.Type == judgement.Type))
{
result.ResultCount.Value++;
}
};
scoreProcessor.JudgementReverted += judgement =>
{
foreach (JudgementCounterInfo result in Results.Where(result => result.Type == judgement.Type))
{
result.ResultCount.Value--;
}
};
}
}

View File

@ -107,6 +107,8 @@ namespace osu.Game.Screens.Play
Children = new Drawable[]
{
CreateFailingLayer(),
//Needs to be initialized before skinnable drawables.
tally = new JudgementTally(),
mainComponents = new MainComponentsContainer
{
AlwaysPresent = true,
@ -150,7 +152,6 @@ namespace osu.Game.Screens.Play
Spacing = new Vector2(5)
},
clicksPerSecondCalculator = new ClicksPerSecondCalculator(),
tally = new JudgementTally()
};
hideTargets = new List<Drawable> { mainComponents, KeyCounter, topRightElements };