mirror of
https://github.com/ppy/osu
synced 2025-03-19 17:44:30 +00:00
Add 'swoosh' samples to accentuate MainMenu
animations
This commit is contained in:
parent
17aa079cb1
commit
f0a1df06ac
@ -86,6 +86,7 @@ namespace osu.Game.Screens.Menu
|
||||
private readonly List<MainMenuButton> buttonsPlay = new List<MainMenuButton>();
|
||||
|
||||
private Sample sampleBackToLogo;
|
||||
private Sample sampleLogoSwoosh;
|
||||
|
||||
private readonly LogoTrackingContainer logoTrackingContainer;
|
||||
|
||||
@ -156,6 +157,7 @@ namespace osu.Game.Screens.Menu
|
||||
if (idleTracker != null) isIdle.BindTo(idleTracker.IsIdle);
|
||||
|
||||
sampleBackToLogo = audio.Samples.Get(@"Menu/back-to-logo");
|
||||
sampleLogoSwoosh = audio.Samples.Get(@"Menu/osu-logo-swoosh");
|
||||
}
|
||||
|
||||
private void onMultiplayer()
|
||||
@ -263,6 +265,8 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
// Samples are explicitly played here in response to user interaction and not when transitioning due to idle.
|
||||
sampleBackToLogo?.Play();
|
||||
sampleLogoSwoosh?.Play();
|
||||
|
||||
return true;
|
||||
|
||||
case ButtonSystemState.Play:
|
||||
|
@ -7,6 +7,8 @@ using System;
|
||||
using System.Diagnostics;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Sample;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -89,8 +91,10 @@ namespace osu.Game.Screens.Menu
|
||||
private SongTicker songTicker;
|
||||
private Container logoTarget;
|
||||
|
||||
private Sample reappearSampleSwoosh;
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load(BeatmapListingOverlay beatmapListing, SettingsOverlay settings, OsuConfigManager config, SessionStatics statics)
|
||||
private void load(BeatmapListingOverlay beatmapListing, SettingsOverlay settings, OsuConfigManager config, SessionStatics statics, AudioManager audio)
|
||||
{
|
||||
holdDelay = config.GetBindable<double>(OsuSetting.UIHoldActivationDelay);
|
||||
loginDisplayed = statics.GetBindable<bool>(Static.LoginOverlayDisplayed);
|
||||
@ -162,6 +166,8 @@ namespace osu.Game.Screens.Menu
|
||||
Buttons.OnSettings = () => settings?.ToggleVisibility();
|
||||
Buttons.OnBeatmapListing = () => beatmapListing?.ToggleVisibility();
|
||||
|
||||
reappearSampleSwoosh = audio.Samples.Get(@"Menu/reappear-swoosh");
|
||||
|
||||
preloadSongSelect();
|
||||
}
|
||||
|
||||
@ -291,6 +297,8 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
base.OnResuming(e);
|
||||
|
||||
reappearSampleSwoosh?.Play();
|
||||
|
||||
ApplyToBackground(b => (b as BackgroundScreenDefault)?.Next());
|
||||
|
||||
// we may have consumed our preloaded instance, so let's make another.
|
||||
|
Loading…
Reference in New Issue
Block a user