mirror of
https://github.com/ppy/osu.git
synced 2024-11-12 01:47:24 +08:00
Merge pull request #4389 from peppy/fix-rider-inspections
Fix some inspections rider isn't able to deal with automatically
This commit is contained in:
commit
7f6e084d40
@ -23,9 +23,6 @@ namespace osu.Game.Tests.Visual
|
||||
[System.ComponentModel.Description("in BeatmapOverlay")]
|
||||
public class TestCaseBeatmapScoresContainer : OsuTestCase
|
||||
{
|
||||
private readonly IEnumerable<APIScoreInfo> scores;
|
||||
private readonly IEnumerable<APIScoreInfo> anotherScores;
|
||||
private readonly APIScoreInfo topScoreInfo;
|
||||
private readonly Box background;
|
||||
|
||||
public TestCaseBeatmapScoresContainer()
|
||||
@ -47,15 +44,7 @@ namespace osu.Game.Tests.Visual
|
||||
}
|
||||
};
|
||||
|
||||
AddStep("scores pack 1", () => scoresContainer.Scores = scores);
|
||||
AddStep("scores pack 2", () => scoresContainer.Scores = anotherScores);
|
||||
AddStep("only top score", () => scoresContainer.Scores = new[] { topScoreInfo });
|
||||
AddStep("remove scores", () => scoresContainer.Scores = null);
|
||||
AddStep("resize to big", () => container.ResizeWidthTo(1, 300));
|
||||
AddStep("resize to normal", () => container.ResizeWidthTo(0.8f, 300));
|
||||
AddStep("online scores", () => scoresContainer.Beatmap = new BeatmapInfo { OnlineBeatmapID = 75, Ruleset = new OsuRuleset().RulesetInfo });
|
||||
|
||||
scores = new[]
|
||||
IEnumerable<APIScoreInfo> scores = new[]
|
||||
{
|
||||
new APIScoreInfo
|
||||
{
|
||||
@ -168,7 +157,7 @@ namespace osu.Game.Tests.Visual
|
||||
s.Statistics.Add(HitResult.Meh, RNG.Next(2000));
|
||||
}
|
||||
|
||||
anotherScores = new[]
|
||||
IEnumerable<APIScoreInfo> anotherScores = new[]
|
||||
{
|
||||
new APIScoreInfo
|
||||
{
|
||||
@ -280,7 +269,7 @@ namespace osu.Game.Tests.Visual
|
||||
s.Statistics.Add(HitResult.Meh, RNG.Next(2000));
|
||||
}
|
||||
|
||||
topScoreInfo = new APIScoreInfo
|
||||
var topScoreInfo = new APIScoreInfo
|
||||
{
|
||||
User = new User
|
||||
{
|
||||
@ -305,6 +294,14 @@ namespace osu.Game.Tests.Visual
|
||||
topScoreInfo.Statistics.Add(HitResult.Great, RNG.Next(2000));
|
||||
topScoreInfo.Statistics.Add(HitResult.Good, RNG.Next(2000));
|
||||
topScoreInfo.Statistics.Add(HitResult.Meh, RNG.Next(2000));
|
||||
|
||||
AddStep("scores pack 1", () => scoresContainer.Scores = scores);
|
||||
AddStep("scores pack 2", () => scoresContainer.Scores = anotherScores);
|
||||
AddStep("only top score", () => scoresContainer.Scores = new[] { topScoreInfo });
|
||||
AddStep("remove scores", () => scoresContainer.Scores = null);
|
||||
AddStep("resize to big", () => container.ResizeWidthTo(1, 300));
|
||||
AddStep("resize to normal", () => container.ResizeWidthTo(0.8f, 300));
|
||||
AddStep("online scores", () => scoresContainer.Beatmap = new BeatmapInfo { OnlineBeatmapID = 75, Ruleset = new OsuRuleset().RulesetInfo });
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
|
@ -91,7 +91,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Height = 0.5f,
|
||||
Icon = FontAwesome.fa_search_plus,
|
||||
Action = () => timeline.Zoom++
|
||||
Action = () => changeZoom(1)
|
||||
},
|
||||
new TimelineButton
|
||||
{
|
||||
@ -100,7 +100,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Height = 0.5f,
|
||||
Icon = FontAwesome.fa_search_minus,
|
||||
Action = () => timeline.Zoom--
|
||||
Action = () => changeZoom(-1)
|
||||
},
|
||||
}
|
||||
}
|
||||
@ -124,5 +124,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
|
||||
timeline.WaveformVisible.BindTo(waveformCheckbox.Current);
|
||||
}
|
||||
|
||||
private void changeZoom(float change) => timeline.Zoom += change;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user