mirror of
https://github.com/ppy/osu
synced 2025-01-02 12:22:13 +00:00
Merge branch 'master' into fix-channel-id-clash
This commit is contained in:
commit
8fbc0c1d0d
@ -51,7 +51,7 @@
|
||||
<Reference Include="Java.Interop" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.628.0" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.702.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2022.629.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="Transitive Dependencies">
|
||||
|
@ -6,6 +6,8 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
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;
|
||||
@ -28,6 +30,9 @@ namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
public const int BUTTON_WIDTH = 200;
|
||||
|
||||
protected override string PopInSampleName => "";
|
||||
protected override string PopOutSampleName => @"SongSelect/mod-select-overlay-pop-out";
|
||||
|
||||
[Cached]
|
||||
public Bindable<IReadOnlyList<Mod>> SelectedMods { get; private set; } = new Bindable<IReadOnlyList<Mod>>(Array.Empty<Mod>());
|
||||
|
||||
@ -101,17 +106,21 @@ namespace osu.Game.Overlays.Mods
|
||||
|
||||
private ShearedToggleButton? customisationButton;
|
||||
|
||||
private Sample? columnAppearSample;
|
||||
|
||||
protected ModSelectOverlay(OverlayColourScheme colourScheme = OverlayColourScheme.Green)
|
||||
: base(colourScheme)
|
||||
{
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuGameBase game, OsuColour colours)
|
||||
private void load(OsuGameBase game, OsuColour colours, AudioManager audio)
|
||||
{
|
||||
Header.Title = ModSelectOverlayStrings.ModSelectTitle;
|
||||
Header.Description = ModSelectOverlayStrings.ModSelectDescription;
|
||||
|
||||
columnAppearSample = audio.Samples.Get(@"SongSelect/mod-column-pop-in");
|
||||
|
||||
AddRange(new Drawable[]
|
||||
{
|
||||
new ClickToReturnContainer
|
||||
@ -453,8 +462,31 @@ namespace osu.Game.Overlays.Mods
|
||||
.MoveToY(0, duration, Easing.OutQuint)
|
||||
.FadeIn(duration, Easing.OutQuint);
|
||||
|
||||
if (!allFiltered)
|
||||
nonFilteredColumnCount += 1;
|
||||
if (allFiltered)
|
||||
continue;
|
||||
|
||||
int columnNumber = nonFilteredColumnCount;
|
||||
Scheduler.AddDelayed(() =>
|
||||
{
|
||||
var channel = columnAppearSample?.GetChannel();
|
||||
if (channel == null) return;
|
||||
|
||||
// Still play sound effects for off-screen columns up to a certain point.
|
||||
if (columnNumber > 5 && !column.Active.Value) return;
|
||||
|
||||
// use X position of the column on screen as a basis for panning the sample
|
||||
float balance = column.Parent.BoundingBox.Centre.X / RelativeToAbsoluteFactor.X;
|
||||
|
||||
// dip frequency and ramp volume of sample over the first 5 displayed columns
|
||||
float progress = Math.Min(1, columnNumber / 5f);
|
||||
|
||||
channel.Frequency.Value = 1.3 - (progress * 0.3) + RNG.NextDouble(0.1);
|
||||
channel.Volume.Value = Math.Max(progress, 0.2);
|
||||
channel.Balance.Value = -1 + balance * 2;
|
||||
channel.Play();
|
||||
}, delay);
|
||||
|
||||
nonFilteredColumnCount += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,19 +4,18 @@
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Screens.Select
|
||||
{
|
||||
@ -68,7 +67,6 @@ namespace osu.Game.Screens.Select
|
||||
private readonly Box light;
|
||||
|
||||
public FooterButton()
|
||||
: base(HoverSampleSet.Toolbar)
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
Shear = SHEAR;
|
||||
|
@ -37,7 +37,7 @@
|
||||
</PackageReference>
|
||||
<PackageReference Include="Realm" Version="10.14.0" />
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2022.629.0" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.628.0" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.702.0" />
|
||||
<PackageReference Include="Sentry" Version="3.17.1" />
|
||||
<PackageReference Include="SharpCompress" Version="0.31.0" />
|
||||
<PackageReference Include="NUnit" Version="3.13.3" />
|
||||
|
@ -62,7 +62,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="Package References">
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2022.629.0" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.628.0" />
|
||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.702.0" />
|
||||
</ItemGroup>
|
||||
<!-- See https://github.com/dotnet/runtime/issues/35988 (can be removed after Xamarin uses net6.0) -->
|
||||
<PropertyGroup>
|
||||
|
Loading…
Reference in New Issue
Block a user