mirror of
https://github.com/ppy/osu
synced 2024-12-16 03:45:46 +00:00
Merge branch 'master' into better-skin-hashing
This commit is contained in:
commit
1a3dd7ac76
@ -74,6 +74,13 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
|
||||
private void returnToMenu()
|
||||
{
|
||||
// if we don't pause, there's a chance the track may change at the main menu out of our control (due to reaching the end of the track).
|
||||
AddStep("pause audio", () =>
|
||||
{
|
||||
if (Game.MusicController.IsPlaying)
|
||||
Game.MusicController.TogglePause();
|
||||
});
|
||||
|
||||
AddStep("return to menu", () => Game.ScreenStack.CurrentScreen.Exit());
|
||||
AddUntilStep("wait for menu", () => Game.ScreenStack.CurrentScreen is MainMenu);
|
||||
}
|
||||
|
@ -110,6 +110,13 @@ namespace osu.Game.Tests.Visual.Navigation
|
||||
|
||||
private void returnToMenu()
|
||||
{
|
||||
// if we don't pause, there's a chance the track may change at the main menu out of our control (due to reaching the end of the track).
|
||||
AddStep("pause audio", () =>
|
||||
{
|
||||
if (Game.MusicController.IsPlaying)
|
||||
Game.MusicController.TogglePause();
|
||||
});
|
||||
|
||||
AddStep("return to menu", () => Game.ScreenStack.CurrentScreen.Exit());
|
||||
AddUntilStep("wait for menu", () => Game.ScreenStack.CurrentScreen is MainMenu);
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ namespace osu.Game.Configuration
|
||||
Set(OsuSetting.Skin, 0, -1, int.MaxValue);
|
||||
|
||||
Set(OsuSetting.BeatmapDetailTab, PlayBeatmapDetailArea.TabType.Details);
|
||||
Set(OsuSetting.BeatmapDetailModsFilter, false);
|
||||
|
||||
Set(OsuSetting.ShowConvertedBeatmaps, true);
|
||||
Set(OsuSetting.DisplayStarsMinimum, 0.0, 0, 10, 0.1);
|
||||
@ -200,6 +201,7 @@ namespace osu.Game.Configuration
|
||||
CursorRotation,
|
||||
MenuParallax,
|
||||
BeatmapDetailTab,
|
||||
BeatmapDetailModsFilter,
|
||||
Username,
|
||||
ReleaseStream,
|
||||
SavePassword,
|
||||
|
@ -30,6 +30,8 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
protected Bindable<BeatmapDetailAreaTabItem> CurrentTab => tabControl.Current;
|
||||
|
||||
protected Bindable<bool> CurrentModsFilter => tabControl.CurrentModsFilter;
|
||||
|
||||
private readonly Container content;
|
||||
protected override Container<Drawable> Content => content;
|
||||
|
||||
|
@ -26,6 +26,12 @@ namespace osu.Game.Screens.Select
|
||||
set => tabs.Current = value;
|
||||
}
|
||||
|
||||
public Bindable<bool> CurrentModsFilter
|
||||
{
|
||||
get => modsCheckbox.Current;
|
||||
set => modsCheckbox.Current = value;
|
||||
}
|
||||
|
||||
public Action<BeatmapDetailAreaTabItem, bool> OnFilter; // passed the selected tab and if mods is checked
|
||||
|
||||
public IReadOnlyList<BeatmapDetailAreaTabItem> TabItems
|
||||
|
@ -29,6 +29,8 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
private Bindable<TabType> selectedTab;
|
||||
|
||||
private Bindable<bool> selectedModsFilter;
|
||||
|
||||
public PlayBeatmapDetailArea()
|
||||
{
|
||||
Add(Leaderboard = new BeatmapLeaderboard { RelativeSizeAxes = Axes.Both });
|
||||
@ -38,8 +40,13 @@ namespace osu.Game.Screens.Select
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
selectedTab = config.GetBindable<TabType>(OsuSetting.BeatmapDetailTab);
|
||||
selectedModsFilter = config.GetBindable<bool>(OsuSetting.BeatmapDetailModsFilter);
|
||||
|
||||
selectedTab.BindValueChanged(tab => CurrentTab.Value = getTabItemFromTabType(tab.NewValue), true);
|
||||
CurrentTab.BindValueChanged(tab => selectedTab.Value = getTabTypeFromTabItem(tab.NewValue));
|
||||
|
||||
selectedModsFilter.BindValueChanged(checkbox => CurrentModsFilter.Value = checkbox.NewValue, true);
|
||||
CurrentModsFilter.BindValueChanged(checkbox => selectedModsFilter.Value = checkbox.NewValue);
|
||||
}
|
||||
|
||||
public override void Refresh()
|
||||
|
Loading…
Reference in New Issue
Block a user