Merge pull request #14785 from nekodex/wrong-password

Add audio feedback for incorrect multiplayer room password
This commit is contained in:
Dean Herbert 2021-09-18 12:02:33 +09:00 committed by GitHub
commit 801bee7c47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 4 deletions

View File

@ -51,7 +51,7 @@
<Reference Include="Java.Interop" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Game.Resources" Version="2021.913.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2021.918.0" />
<PackageReference Include="ppy.osu.Framework.Android" Version="2021.916.1" />
</ItemGroup>
<ItemGroup Label="Transitive Dependencies">

View File

@ -189,9 +189,10 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
private OsuPasswordTextBox passwordTextbox;
private TriangleButton joinButton;
private OsuSpriteText errorText;
private Sample sampleJoinFail;
[BackgroundDependencyLoader]
private void load(OsuColour colours)
private void load(OsuColour colours, AudioManager audio)
{
Child = new FillFlowContainer
{
@ -227,6 +228,8 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
}
};
sampleJoinFail = audio.Samples.Get(@"UI/password-fail");
joinButton.Action = () => lounge?.Join(room, passwordTextbox.Text, null, joinFailed);
}
@ -244,6 +247,8 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
.FadeOutFromOne(1000, Easing.In);
Body.Shake();
sampleJoinFail?.Play();
}
protected override void LoadComplete()

View File

@ -37,7 +37,7 @@
</PackageReference>
<PackageReference Include="Realm" Version="10.5.0" />
<PackageReference Include="ppy.osu.Framework" Version="2021.916.1" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2021.913.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2021.918.0" />
<PackageReference Include="Sentry" Version="3.9.0" />
<PackageReference Include="SharpCompress" Version="0.28.3" />
<PackageReference Include="NUnit" Version="3.13.2" />

View File

@ -71,7 +71,7 @@
</ItemGroup>
<ItemGroup Label="Package References">
<PackageReference Include="ppy.osu.Framework.iOS" Version="2021.916.1" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2021.913.0" />
<PackageReference Include="ppy.osu.Game.Resources" Version="2021.918.0" />
</ItemGroup>
<!-- See https://github.com/dotnet/runtime/issues/35988 (can be removed after Xamarin uses net5.0 / net6.0) -->
<PropertyGroup>