mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 07:42:55 +08:00
Merge branch 'master' into netcoreapp2.1
This commit is contained in:
commit
88b23d4e66
@ -65,11 +65,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
carousel.SelectionChanged = s => currentSelection = s;
|
carousel.SelectionChanged = s => currentSelection = s;
|
||||||
|
|
||||||
AddStep("Load Beatmaps", () => { carousel.BeatmapSets = beatmapSets; });
|
loadBeatmaps(beatmapSets);
|
||||||
|
|
||||||
bool changed = false;
|
|
||||||
carousel.BeatmapSetsChanged = () => changed = true;
|
|
||||||
AddUntilStep(() => changed, "Wait for load");
|
|
||||||
|
|
||||||
testTraversal();
|
testTraversal();
|
||||||
testFiltering();
|
testFiltering();
|
||||||
@ -84,6 +80,17 @@ namespace osu.Game.Tests.Visual
|
|||||||
testCarouselRootIsRandom();
|
testCarouselRootIsRandom();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void loadBeatmaps(List<BeatmapSetInfo> beatmapSets)
|
||||||
|
{
|
||||||
|
bool changed = false;
|
||||||
|
AddStep($"Load {beatmapSets.Count} Beatmaps", () =>
|
||||||
|
{
|
||||||
|
carousel.BeatmapSetsChanged = () => changed = true;
|
||||||
|
carousel.BeatmapSets = beatmapSets;
|
||||||
|
});
|
||||||
|
AddUntilStep(() => changed, "Wait for load");
|
||||||
|
}
|
||||||
|
|
||||||
private void ensureRandomFetchSuccess() =>
|
private void ensureRandomFetchSuccess() =>
|
||||||
AddAssert("ensure prev random fetch worked", () => selectedSets.Peek() == carousel.SelectedBeatmapSet);
|
AddAssert("ensure prev random fetch worked", () => selectedSets.Peek() == carousel.SelectedBeatmapSet);
|
||||||
|
|
||||||
@ -423,7 +430,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
for (int i = 1; i <= 50; i++)
|
for (int i = 1; i <= 50; i++)
|
||||||
beatmapSets.Add(createTestBeatmapSet(i));
|
beatmapSets.Add(createTestBeatmapSet(i));
|
||||||
|
|
||||||
AddStep("Load 50 Beatmaps", () => { carousel.BeatmapSets = beatmapSets; });
|
loadBeatmaps(beatmapSets);
|
||||||
advanceSelection(direction: 1, diff: false);
|
advanceSelection(direction: 1, diff: false);
|
||||||
checkNonmatchingFilter();
|
checkNonmatchingFilter();
|
||||||
checkNonmatchingFilter();
|
checkNonmatchingFilter();
|
||||||
|
@ -50,11 +50,11 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
content.ResizeHeightTo(0, transition_duration, Easing.OutQuint);
|
content.ResizeHeightTo(0, transition_duration, Easing.OutQuint);
|
||||||
}
|
}
|
||||||
|
|
||||||
button.FadeColour(expanded ? buttonActiveColour : Color4.White, 200, Easing.OutQuint);
|
updateExpanded();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Color4 buttonActiveColour;
|
private Color4 expandedColour;
|
||||||
|
|
||||||
protected PlayerSettingsGroup()
|
protected PlayerSettingsGroup()
|
||||||
{
|
{
|
||||||
@ -130,9 +130,13 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
button.Colour = buttonActiveColour = colours.Yellow;
|
expandedColour = colours.Yellow;
|
||||||
|
|
||||||
|
updateExpanded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateExpanded() => button.FadeColour(expanded ? expandedColour : Color4.White, 200, Easing.InOutQuint);
|
||||||
|
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
protected override bool OnHover(InputState state) => true;
|
protected override bool OnHover(InputState state) => true;
|
||||||
|
Loading…
Reference in New Issue
Block a user