mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 20:42:55 +08:00
Fix regression in testing and setting logic
This commit is contained in:
parent
8ce545ff9d
commit
096d6df868
@ -44,7 +44,6 @@ namespace osu.Game.Tests.Visual.Settings
|
|||||||
|
|
||||||
clickUntilResults(true);
|
clickUntilResults(true);
|
||||||
AddAssert("check at results", () => !latencyCertifier.ChildrenOfType<LatencyArea>().Any());
|
AddAssert("check at results", () => !latencyCertifier.ChildrenOfType<LatencyArea>().Any());
|
||||||
AddAssert("check no buttons", () => !latencyCertifier.ChildrenOfType<OsuButton>().Any());
|
|
||||||
checkDifficulty(1);
|
checkDifficulty(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,8 +90,6 @@ namespace osu.Game.Screens.Utility
|
|||||||
private double lastPoll;
|
private double lastPoll;
|
||||||
private int pollingMax;
|
private int pollingMax;
|
||||||
|
|
||||||
private readonly FillFlowContainer settings;
|
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private GameHost host { get; set; } = null!;
|
private GameHost host { get; set; } = null!;
|
||||||
|
|
||||||
@ -130,7 +128,7 @@ namespace osu.Game.Screens.Utility
|
|||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopRight,
|
Origin = Anchor.TopRight,
|
||||||
},
|
},
|
||||||
settings = new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
Name = "Settings",
|
Name = "Settings",
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
@ -140,13 +138,43 @@ namespace osu.Game.Screens.Utility
|
|||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.BottomCentre,
|
||||||
Origin = Anchor.BottomCentre,
|
Origin = Anchor.BottomCentre,
|
||||||
Child = explanatoryText = new LinkFlowContainer(cp => cp.Font = OsuFont.Default.With(size: 20))
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Y,
|
explanatoryText = new LinkFlowContainer(cp => cp.Font = OsuFont.Default.With(size: 20))
|
||||||
RelativeSizeAxes = Axes.X,
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
AutoSizeAxes = Axes.Y,
|
||||||
Origin = Anchor.TopCentre,
|
RelativeSizeAxes = Axes.X,
|
||||||
TextAnchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
TextAnchor = Anchor.TopCentre,
|
||||||
|
},
|
||||||
|
new SettingsSlider<double>
|
||||||
|
{
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
RelativeSizeAxes = Axes.None,
|
||||||
|
Width = 400,
|
||||||
|
LabelText = "bpm",
|
||||||
|
Current = SampleBPM
|
||||||
|
},
|
||||||
|
new SettingsSlider<float>
|
||||||
|
{
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
RelativeSizeAxes = Axes.None,
|
||||||
|
Width = 400,
|
||||||
|
LabelText = "visual spacing",
|
||||||
|
Current = SampleVisualSpacing
|
||||||
|
},
|
||||||
|
new SettingsSlider<double>
|
||||||
|
{
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
RelativeSizeAxes = Axes.None,
|
||||||
|
Width = 400,
|
||||||
|
LabelText = "approach rate",
|
||||||
|
Current = SampleApproachRate
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
resultsArea = new Container
|
resultsArea = new Container
|
||||||
@ -227,6 +255,7 @@ namespace osu.Game.Screens.Utility
|
|||||||
private void showResults()
|
private void showResults()
|
||||||
{
|
{
|
||||||
mainArea.Clear();
|
mainArea.Clear();
|
||||||
|
resultsArea.Clear();
|
||||||
|
|
||||||
var displayMode = host.Window?.CurrentDisplayMode.Value;
|
var displayMode = host.Window?.CurrentDisplayMode.Value;
|
||||||
|
|
||||||
@ -442,37 +471,6 @@ namespace osu.Game.Screens.Utility
|
|||||||
mainArea.Children.First(a => a != area).IsActiveArea.Value = false;
|
mainArea.Children.First(a => a != area).IsActiveArea.Value = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
settings.AddRange(new Drawable[]
|
|
||||||
{
|
|
||||||
new SettingsSlider<double>
|
|
||||||
{
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
RelativeSizeAxes = Axes.None,
|
|
||||||
Width = 400,
|
|
||||||
LabelText = "bpm",
|
|
||||||
Current = SampleBPM
|
|
||||||
},
|
|
||||||
new SettingsSlider<float>
|
|
||||||
{
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
RelativeSizeAxes = Axes.None,
|
|
||||||
Width = 400,
|
|
||||||
LabelText = "visual spacing",
|
|
||||||
Current = SampleVisualSpacing
|
|
||||||
},
|
|
||||||
new SettingsSlider<double>
|
|
||||||
{
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
RelativeSizeAxes = Axes.None,
|
|
||||||
Width = 400,
|
|
||||||
LabelText = "approach rate",
|
|
||||||
Current = SampleApproachRate
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void recordResult(bool correct)
|
private void recordResult(bool correct)
|
||||||
|
Loading…
Reference in New Issue
Block a user