From f00ae7fb2199a46082be0a993caad0e35142a731 Mon Sep 17 00:00:00 2001 From: stefnotch Date: Wed, 27 Jan 2021 21:30:22 +0100 Subject: [PATCH] Disable CTRL+W during the game Fix #96 --- Source/Editor/Windows/GameWindow.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Editor/Windows/GameWindow.cs b/Source/Editor/Windows/GameWindow.cs index 35bc91bbe..0a259566c 100644 --- a/Source/Editor/Windows/GameWindow.cs +++ b/Source/Editor/Windows/GameWindow.cs @@ -387,6 +387,12 @@ namespace FlaxEditor.Windows } } + // Prevent closing the game window tab during a play session + if (Editor.StateMachine.IsPlayMode && Editor.Options.Options.Input.CloseTab.Process(Root)) + { + return true; + } + return base.OnKeyDown(key); }