1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-12 17:23:09 +08:00

Merge pull request #3425 from LastExceed/close-chattabs-with-Mclick

Close chat tabs with middle mouse button
This commit is contained in:
Dan Balasescu 2018-09-18 15:45:46 +09:00 committed by GitHub
commit 492b5edb02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,7 @@ using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.Chat;
using OpenTK;
using OpenTK.Input;
using OpenTK.Graphics;
using osu.Framework.Configuration;
using System;
@ -143,6 +144,17 @@ namespace osu.Game.Overlays.Chat
textBold.FadeOut(transition_length, Easing.OutQuint);
}
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
{
if (args.Button == MouseButton.Middle)
{
closeButton.Action();
return true;
}
return false;
}
protected override bool OnHover(InputState state)
{
if (IsRemovable)