mirror of https://github.com/ppy/osu
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 @@ public ChannelSelectorTabChannel()
|
|||
Name = "+";
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool OnMouseUp(MouseUpEvent e) => false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
using osu.Game.Online.Chat;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osuTK.Input;
|
||||
|
||||
namespace osu.Game.Overlays.Chat.Tabs
|
||||
{
|
||||
|
@ -138,6 +139,17 @@ protected override void OnHoverLost(HoverLostEvent e)
|
|||
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…
Reference in New Issue