mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:42:55 +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:
commit
5f0d633b34
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user