Merge branch 'Tryibion-game-window-focus-issue'
This commit is contained in:
@@ -463,6 +463,18 @@ namespace FlaxEditor.Windows
|
||||
Cursor = CursorType.Default;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnMouseLeave()
|
||||
{
|
||||
base.OnMouseLeave();
|
||||
|
||||
// Remove focus from game window when mouse moves out and the cursor is hidden during game
|
||||
if ((IsFocused || ContainsFocus) && Parent != null && Editor.IsPlayMode && !Screen.CursorVisible)
|
||||
{
|
||||
Parent.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnShowContextMenu(ContextMenu menu)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user