mirror of
https://github.com/ppy/osu
synced 2025-01-05 05:39:49 +00:00
always use default samples
This commit is contained in:
parent
ec78889e94
commit
afa043aa7d
@ -2,6 +2,7 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Framework.Graphics;
|
||||
|
||||
@ -17,10 +18,10 @@ namespace osu.Game.Screens.Menu
|
||||
private const double delay_step_two = 600;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
private void load(AudioManager audio)
|
||||
{
|
||||
if (MenuVoice.Value)
|
||||
SetWelcome();
|
||||
Welcome = audio.Samples.Get(@"welcome");
|
||||
}
|
||||
|
||||
protected override void LogoArriving(OsuLogo logo, bool resuming)
|
||||
|
@ -9,14 +9,11 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Audio;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.IO.Archives;
|
||||
using osu.Game.Screens.Backgrounds;
|
||||
using osu.Game.Skinning;
|
||||
using osu.Game.Online.API;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
@ -51,14 +48,10 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
public new Bindable<WorkingBeatmap> Beatmap => beatmap;
|
||||
|
||||
protected Bindable<User> User;
|
||||
|
||||
protected Bindable<Skin> Skin;
|
||||
|
||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBlack();
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config, IAPIProvider api, SkinManager skinManager, BeatmapManager beatmaps, Framework.Game game)
|
||||
private void load(OsuConfigManager config, SkinManager skinManager, BeatmapManager beatmaps, Framework.Game game)
|
||||
{
|
||||
// prevent user from changing beatmap while the intro is still runnning.
|
||||
beatmap = base.Beatmap.BeginLease(false);
|
||||
@ -66,10 +59,7 @@ namespace osu.Game.Screens.Menu
|
||||
MenuVoice = config.GetBindable<bool>(OsuSetting.MenuVoice);
|
||||
MenuMusic = config.GetBindable<bool>(OsuSetting.MenuMusic);
|
||||
|
||||
User = api.LocalUser.GetBoundCopy();
|
||||
Skin = skinManager.CurrentSkin.GetBoundCopy();
|
||||
|
||||
Skin.BindValueChanged(_ => updateSeeya(), true);
|
||||
seeya = audio.Samples.Get(@"seeya");
|
||||
|
||||
BeatmapSetInfo setInfo = null;
|
||||
|
||||
@ -98,22 +88,6 @@ namespace osu.Game.Screens.Menu
|
||||
Track = IntroBeatmap.Track;
|
||||
}
|
||||
|
||||
private void updateSeeya()
|
||||
{
|
||||
if (User.Value?.IsSupporter ?? false)
|
||||
seeya = Skin.Value.GetSample(new SampleInfo("seeya")) ?? audio.Samples.Get(@"seeya");
|
||||
else
|
||||
seeya = audio.Samples.Get(@"seeya");
|
||||
}
|
||||
|
||||
protected void SetWelcome()
|
||||
{
|
||||
if (User.Value?.IsSupporter ?? false)
|
||||
Welcome = Skin.Value.GetSample(new SampleInfo("welcome")) ?? audio.Samples.Get(@"welcome");
|
||||
else
|
||||
Welcome = audio.Samples.Get(@"welcome");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether we have loaded the menu previously.
|
||||
/// </summary>
|
||||
|
@ -41,10 +41,10 @@ namespace osu.Game.Screens.Menu
|
||||
private BackgroundScreenDefault background;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
private void load(AudioManager audio)
|
||||
{
|
||||
if (MenuVoice.Value && !MenuMusic.Value)
|
||||
SetWelcome();
|
||||
Welcome = audio.Samples.Get(@"welcome");
|
||||
}
|
||||
|
||||
protected override void LogoArriving(OsuLogo logo, bool resuming)
|
||||
|
Loading…
Reference in New Issue
Block a user