From 52d4dff5873f8bea6942b63f2ee521042b4c376e Mon Sep 17 00:00:00 2001 From: Menotdan <32620310+Menotdan@users.noreply.github.com> Date: Fri, 8 Dec 2023 22:11:54 -0500 Subject: [PATCH] Fix build regression involving TextBoxBase being used in both game builds and editor builds. --- Source/Engine/UI/GUI/Common/TextBoxBase.cs | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/Source/Engine/UI/GUI/Common/TextBoxBase.cs b/Source/Engine/UI/GUI/Common/TextBoxBase.cs index 7feaea6b2..c1001e835 100644 --- a/Source/Engine/UI/GUI/Common/TextBoxBase.cs +++ b/Source/Engine/UI/GUI/Common/TextBoxBase.cs @@ -1,7 +1,9 @@ // Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. using System; +#if FLAX_EDITOR using FlaxEditor.Options; +#endif using FlaxEngine.Assertions; using FlaxEngine.Utilities; @@ -1298,6 +1300,7 @@ namespace FlaxEngine.GUI KeyDown?.Invoke(key); // Handle controls that have bindings +#if FLAX_EDITOR InputOptions options = FlaxEditor.Editor.Instance.Options.Options.Input; if (options.Copy.Process(this)) { @@ -1329,6 +1332,7 @@ namespace FlaxEngine.GUI Deselect(); return true; } +#endif // Handle controls without bindings switch (key) @@ -1345,6 +1349,41 @@ namespace FlaxEngine.GUI case KeyboardKeys.ArrowDown: MoveDown(shiftDown, ctrDown); return true; + case KeyboardKeys.C: + if (ctrDown) + { + Copy(); + return true; + } + break; + case KeyboardKeys.V: + if (ctrDown) + { + Paste(); + return true; + } + break; + case KeyboardKeys.D: + if (ctrDown) + { + Duplicate(); + return true; + } + break; + case KeyboardKeys.X: + if (ctrDown) + { + Cut(); + return true; + } + break; + case KeyboardKeys.A: + if (ctrDown) + { + SelectAll(); + return true; + } + break; case KeyboardKeys.Backspace: { if (IsReadOnly)