1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 04:47:24 +08:00

close chat tabs with middle mouse button

This commit is contained in:
Max Hübner 2019-07-24 17:17:29 +02:00
parent ae66a7e9e4
commit 78a8a6490e
2 changed files with 15 additions and 0 deletions

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Online.Chat;
@ -39,5 +40,7 @@ namespace osu.Game.Overlays.Chat.Tabs
Name = "+";
}
}
protected override bool OnMouseUp(MouseUpEvent e) => false;
}
}

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,17 @@ namespace osu.Game.Overlays.Chat.Tabs
updateState();
}
protected override bool OnMouseUp(MouseUpEvent e)
{
if (e.Button == MouseButton.Middle)
{
CloseButton.Action();
return true;
}
return false;
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{