mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 01:47: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.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Online.Chat;
|
using osu.Game.Online.Chat;
|
||||||
|
|
||||||
@ -39,5 +40,7 @@ namespace osu.Game.Overlays.Chat.Tabs
|
|||||||
Name = "+";
|
Name = "+";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override bool OnMouseUp(MouseUpEvent e) => false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ using osu.Game.Graphics.Sprites;
|
|||||||
using osu.Game.Online.Chat;
|
using osu.Game.Online.Chat;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
using osuTK.Input;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Chat.Tabs
|
namespace osu.Game.Overlays.Chat.Tabs
|
||||||
{
|
{
|
||||||
@ -138,6 +139,17 @@ namespace osu.Game.Overlays.Chat.Tabs
|
|||||||
updateState();
|
updateState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override bool OnMouseUp(MouseUpEvent e)
|
||||||
|
{
|
||||||
|
if (e.Button == MouseButton.Middle)
|
||||||
|
{
|
||||||
|
CloseButton.Action();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user