1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:43:05 +08:00

Allow closing chat tabs with middle mouse button (#5447)

Allow closing chat tabs with middle mouse button

Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
Dean Herbert 2019-07-26 13:31:25 +09:00 committed by GitHub
commit 5f0d633b34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,6 +16,7 @@ using osu.Game.Graphics.Sprites;
using osu.Game.Online.Chat;
using osuTK;
using osuTK.Graphics;
using osuTK.Input;
namespace osu.Game.Overlays.Chat.Tabs
{
@ -138,6 +139,19 @@ namespace osu.Game.Overlays.Chat.Tabs
updateState();
}
protected override bool OnMouseUp(MouseUpEvent e)
{
switch (e.Button)
{
case MouseButton.Middle:
CloseButton.Click();
return true;
default:
return false;
}
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{