mirror of
https://github.com/ppy/osu.git
synced 2025-03-22 21:00:33 +08:00
close chat tabs with middle mouse button
This commit is contained in:
parent
ae66a7e9e4
commit
78a8a6490e
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user