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

Tidy up JudgementCounter classes

This commit is contained in:
Dean Herbert 2024-09-18 14:35:18 +09:00
parent 2d993645af
commit c46e9cbce3
No known key found for this signature in database
4 changed files with 22 additions and 14 deletions

View File

@ -0,0 +1,18 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Bindables;
using osu.Framework.Localisation;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Screens.Play.HUD.JudgementCounter
{
public struct JudgementCount
{
public LocalisableString DisplayName { get; set; }
public HitResult[] Types { get; set; }
public BindableInt ResultCount { get; set; }
}
}

View File

@ -67,14 +67,5 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
else
count.ResultCount.Value++;
}
public struct JudgementCount
{
public LocalisableString DisplayName { get; set; }
public HitResult[] Types { get; set; }
public BindableInt ResultCount { get; set; }
}
}
}

View File

@ -9,7 +9,6 @@ using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Scoring;
namespace osu.Game.Screens.Play.HUD.JudgementCounter
@ -19,16 +18,16 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
public BindableBool ShowName = new BindableBool();
public Bindable<FillDirection> Direction = new Bindable<FillDirection>();
public readonly JudgementCountController.JudgementCount Result;
public readonly JudgementCount Result;
public JudgementCounter(JudgementCountController.JudgementCount result) => Result = result;
public JudgementCounter(JudgementCount result) => Result = result;
public OsuSpriteText ResultName = null!;
private FillFlowContainer flowContainer = null!;
private JudgementRollingCounter counter = null!;
[BackgroundDependencyLoader]
private void load(OsuColour colours, IBindable<RulesetInfo> ruleset)
private void load(OsuColour colours)
{
AutoSizeAxes = Axes.Both;

View File

@ -126,7 +126,7 @@ namespace osu.Game.Screens.Play.HUD.JudgementCounter
}
}
private JudgementCounter createCounter(JudgementCountController.JudgementCount info) =>
private JudgementCounter createCounter(JudgementCount info) =>
new JudgementCounter(info)
{
State = { Value = Visibility.Hidden },