diff --git a/Barotrauma/BarotraumaClient/ClientSource/GUI/GUITextBox.cs b/Barotrauma/BarotraumaClient/ClientSource/GUI/GUITextBox.cs index 4d8a2feae..ed8d20768 100644 --- a/Barotrauma/BarotraumaClient/ClientSource/GUI/GUITextBox.cs +++ b/Barotrauma/BarotraumaClient/ClientSource/GUI/GUITextBox.cs @@ -36,6 +36,16 @@ namespace Barotrauma /// If the event launches, the text should already be up to date! /// public event OnTextChangedHandler OnTextChanged; + public OnTextChangedHandler OnTextChangedDelegate + { + set + { + OnTextChanged += (GUITextBox a, string b) => + { + return value.Invoke(a, b); + }; + } + } public bool CaretEnabled { get; set; } public Color? CaretColor { get; set; }