mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 18:42:56 +08:00
fixed test errors
This commit is contained in:
parent
93e3156868
commit
1d0c37e138
@ -17,11 +17,11 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
public partial class AdjustedAttributesTooltip : CompositeDrawable, ITooltip
|
||||
{
|
||||
private Dictionary<string, Bindable<OldNewPair>> attributes = new Dictionary<string, Bindable<OldNewPair>>();
|
||||
private readonly Dictionary<string, Bindable<OldNewPair>> attributes = new Dictionary<string, Bindable<OldNewPair>>();
|
||||
|
||||
private Container content;
|
||||
private readonly Container content;
|
||||
|
||||
private FillFlowContainer attributesFillFlow;
|
||||
private readonly FillFlowContainer attributesFillFlow;
|
||||
|
||||
[Resolved]
|
||||
private OsuColour colours { get; set; } = null!;
|
||||
@ -83,8 +83,8 @@ namespace osu.Game.Overlays.Mods
|
||||
return;
|
||||
}
|
||||
}
|
||||
content.Hide();
|
||||
|
||||
content.Hide();
|
||||
}
|
||||
|
||||
public void AddAttribute(string name)
|
||||
@ -97,6 +97,8 @@ namespace osu.Game.Overlays.Mods
|
||||
|
||||
public void UpdateAttribute(string name, double oldValue, double newValue)
|
||||
{
|
||||
if (!attributes.ContainsKey(name)) return;
|
||||
|
||||
Bindable<OldNewPair> attribute = attributes[name];
|
||||
|
||||
OldNewPair attributeValue = attribute.Value;
|
||||
|
@ -104,6 +104,9 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
rateAdjustTooltip.AddAttribute("AR");
|
||||
rateAdjustTooltip.AddAttribute("OD");
|
||||
|
||||
mods.BindValueChanged(_ =>
|
||||
{
|
||||
modSettingChangeTracker?.Dispose();
|
||||
@ -126,9 +129,6 @@ namespace osu.Game.Overlays.Mods
|
||||
|
||||
BeatmapInfo.BindValueChanged(_ => updateValues(), true);
|
||||
|
||||
rateAdjustTooltip.AddAttribute("AR");
|
||||
rateAdjustTooltip.AddAttribute("OD");
|
||||
|
||||
updateCollapsedState();
|
||||
}
|
||||
|
||||
|
@ -214,14 +214,6 @@ namespace osu.Game.Screens.Select.Details
|
||||
starDifficultyCancellationSource?.Cancel();
|
||||
}
|
||||
|
||||
private static bool hasRateAdjustedProperties(BeatmapDifficulty a, BeatmapDifficulty b)
|
||||
{
|
||||
if (!Precision.AlmostEquals(a.ApproachRate, b.ApproachRate)) return true;
|
||||
if (!Precision.AlmostEquals(a.OverallDifficulty, b.OverallDifficulty)) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public partial class StatisticRow : Container, IHasAccentColour
|
||||
{
|
||||
private const float value_width = 25;
|
||||
|
Loading…
Reference in New Issue
Block a user