mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 09:37:23 +08: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()
|
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());
|
AddStep("return to menu", () => Game.ScreenStack.CurrentScreen.Exit());
|
||||||
AddUntilStep("wait for menu", () => Game.ScreenStack.CurrentScreen is MainMenu);
|
AddUntilStep("wait for menu", () => Game.ScreenStack.CurrentScreen is MainMenu);
|
||||||
}
|
}
|
||||||
|
@ -110,6 +110,13 @@ namespace osu.Game.Tests.Visual.Navigation
|
|||||||
|
|
||||||
private void returnToMenu()
|
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());
|
AddStep("return to menu", () => Game.ScreenStack.CurrentScreen.Exit());
|
||||||
AddUntilStep("wait for menu", () => Game.ScreenStack.CurrentScreen is MainMenu);
|
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.Skin, 0, -1, int.MaxValue);
|
||||||
|
|
||||||
Set(OsuSetting.BeatmapDetailTab, PlayBeatmapDetailArea.TabType.Details);
|
Set(OsuSetting.BeatmapDetailTab, PlayBeatmapDetailArea.TabType.Details);
|
||||||
|
Set(OsuSetting.BeatmapDetailModsFilter, false);
|
||||||
|
|
||||||
Set(OsuSetting.ShowConvertedBeatmaps, true);
|
Set(OsuSetting.ShowConvertedBeatmaps, true);
|
||||||
Set(OsuSetting.DisplayStarsMinimum, 0.0, 0, 10, 0.1);
|
Set(OsuSetting.DisplayStarsMinimum, 0.0, 0, 10, 0.1);
|
||||||
@ -200,6 +201,7 @@ namespace osu.Game.Configuration
|
|||||||
CursorRotation,
|
CursorRotation,
|
||||||
MenuParallax,
|
MenuParallax,
|
||||||
BeatmapDetailTab,
|
BeatmapDetailTab,
|
||||||
|
BeatmapDetailModsFilter,
|
||||||
Username,
|
Username,
|
||||||
ReleaseStream,
|
ReleaseStream,
|
||||||
SavePassword,
|
SavePassword,
|
||||||
|
@ -30,6 +30,8 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
protected Bindable<BeatmapDetailAreaTabItem> CurrentTab => tabControl.Current;
|
protected Bindable<BeatmapDetailAreaTabItem> CurrentTab => tabControl.Current;
|
||||||
|
|
||||||
|
protected Bindable<bool> CurrentModsFilter => tabControl.CurrentModsFilter;
|
||||||
|
|
||||||
private readonly Container content;
|
private readonly Container content;
|
||||||
protected override Container<Drawable> Content => content;
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
|
@ -26,6 +26,12 @@ namespace osu.Game.Screens.Select
|
|||||||
set => tabs.Current = value;
|
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 Action<BeatmapDetailAreaTabItem, bool> OnFilter; // passed the selected tab and if mods is checked
|
||||||
|
|
||||||
public IReadOnlyList<BeatmapDetailAreaTabItem> TabItems
|
public IReadOnlyList<BeatmapDetailAreaTabItem> TabItems
|
||||||
|
@ -29,6 +29,8 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
private Bindable<TabType> selectedTab;
|
private Bindable<TabType> selectedTab;
|
||||||
|
|
||||||
|
private Bindable<bool> selectedModsFilter;
|
||||||
|
|
||||||
public PlayBeatmapDetailArea()
|
public PlayBeatmapDetailArea()
|
||||||
{
|
{
|
||||||
Add(Leaderboard = new BeatmapLeaderboard { RelativeSizeAxes = Axes.Both });
|
Add(Leaderboard = new BeatmapLeaderboard { RelativeSizeAxes = Axes.Both });
|
||||||
@ -38,8 +40,13 @@ namespace osu.Game.Screens.Select
|
|||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
selectedTab = config.GetBindable<TabType>(OsuSetting.BeatmapDetailTab);
|
selectedTab = config.GetBindable<TabType>(OsuSetting.BeatmapDetailTab);
|
||||||
|
selectedModsFilter = config.GetBindable<bool>(OsuSetting.BeatmapDetailModsFilter);
|
||||||
|
|
||||||
selectedTab.BindValueChanged(tab => CurrentTab.Value = getTabItemFromTabType(tab.NewValue), true);
|
selectedTab.BindValueChanged(tab => CurrentTab.Value = getTabItemFromTabType(tab.NewValue), true);
|
||||||
CurrentTab.BindValueChanged(tab => selectedTab.Value = getTabTypeFromTabItem(tab.NewValue));
|
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()
|
public override void Refresh()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user