1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 03:25:11 +08:00

Disallow clicking on chat textbox during gameplay

This commit is contained in:
Dean Herbert 2021-08-18 17:30:50 +09:00
parent eaf7bd72fc
commit 2099298444
2 changed files with 16 additions and 0 deletions

View File

@ -49,6 +49,20 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddStep("expand", () => chatDisplay.Expanded.Value = true);
}
[Test]
public void TestCantClickWhenPlaying()
{
setLocalUserPlaying(true);
AddStep("attempt focus chat", () =>
{
InputManager.MoveMouseTo(textBox);
InputManager.Click(MouseButton.Left);
});
assertChatFocused(false);
}
[Test]
public void TestFocusDroppedWhenPlaying()
{

View File

@ -18,6 +18,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
private IBindable<bool> localUserPlaying = new Bindable<bool>();
public override bool PropagatePositionalInputSubTree => !localUserPlaying.Value;
public Bindable<bool> Expanded = new Bindable<bool>();
private const float height = 100;