mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 00:09:55 +09:00
Update focus handling in line with framework changes
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Input;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Input;
|
||||
using System;
|
||||
using System.Linq;
|
||||
@ -23,11 +24,19 @@ namespace osu.Game.Graphics.UserInterface
|
||||
set
|
||||
{
|
||||
focus = value;
|
||||
if (!focus)
|
||||
TriggerFocusLost();
|
||||
if (!focus && HasFocus)
|
||||
inputManager.ChangeFocus(null);
|
||||
}
|
||||
}
|
||||
|
||||
private InputManager inputManager;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(UserInputManager inputManager)
|
||||
{
|
||||
this.inputManager = inputManager;
|
||||
}
|
||||
|
||||
protected override bool OnFocus(InputState state)
|
||||
{
|
||||
var result = base.OnFocus(state);
|
||||
|
Reference in New Issue
Block a user