From da98c049279c79279ed152fd6c4087a3e6d9a8aa Mon Sep 17 00:00:00 2001 From: Evil Factory <36804725+evilfactory@users.noreply.github.com> Date: Tue, 5 Oct 2021 16:16:40 -0300 Subject: [PATCH] events apparently don't work --- .../BarotraumaClient/ClientSource/GUI/GUITextBox.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; }