mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 12:32:56 +08:00
Disallow clicking on chat textbox during gameplay
This commit is contained in:
parent
eaf7bd72fc
commit
2099298444
@ -49,6 +49,20 @@ namespace osu.Game.Tests.Visual.Multiplayer
|
|||||||
AddStep("expand", () => chatDisplay.Expanded.Value = true);
|
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]
|
[Test]
|
||||||
public void TestFocusDroppedWhenPlaying()
|
public void TestFocusDroppedWhenPlaying()
|
||||||
{
|
{
|
||||||
|
@ -18,6 +18,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
|||||||
|
|
||||||
private IBindable<bool> localUserPlaying = new Bindable<bool>();
|
private IBindable<bool> localUserPlaying = new Bindable<bool>();
|
||||||
|
|
||||||
|
public override bool PropagatePositionalInputSubTree => !localUserPlaying.Value;
|
||||||
|
|
||||||
public Bindable<bool> Expanded = new Bindable<bool>();
|
public Bindable<bool> Expanded = new Bindable<bool>();
|
||||||
|
|
||||||
private const float height = 100;
|
private const float height = 100;
|
||||||
|
Loading…
Reference in New Issue
Block a user