mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Add in-game chat display, along with a global hotkey handling method.
This commit is contained in:
21
osu.Game/Input/GlobalHotkeys.cs
Normal file
21
osu.Game/Input/GlobalHotkeys.cs
Normal file
@ -0,0 +1,21 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Input;
|
||||
|
||||
namespace osu.Game.Input
|
||||
{
|
||||
public class GlobalHotkeys : Drawable
|
||||
{
|
||||
public Func<InputState, KeyDownEventArgs, bool> Handler;
|
||||
|
||||
public override bool HandleInput => true;
|
||||
|
||||
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||
{
|
||||
return Handler(state, args);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user