Keyboard focus is automatically removed from a GUIComponent if it's not in the GUIUpdateList

This commit is contained in:
Regalis
2016-12-12 13:29:41 +02:00
parent 9819c52ced
commit a1d050d307

View File

@@ -33,6 +33,12 @@ namespace Barotrauma
public static void ClearUpdateList()
{
if (KeyboardDispatcher.Subscriber is GUIComponent &&
!ComponentsToUpdate.Contains((GUIComponent)KeyboardDispatcher.Subscriber))
{
KeyboardDispatcher.Subscriber = null;
}
ComponentsToUpdate.Clear();
}