From 534af65f7c802799b34be7fd3a8f73a3524c2785 Mon Sep 17 00:00:00 2001 From: DamianX Date: Fri, 16 Aug 2019 21:52:00 +0200 Subject: [PATCH] Fixed inventory button not updating when window was closed (#304) * Fixed inventory button not updating when window was closed * Only add the event handler once * uhhhh * UHHHHHH --- .../HUD/Inventory/HumanInventoryInterfaceController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Client/GameObjects/Components/HUD/Inventory/HumanInventoryInterfaceController.cs b/Content.Client/GameObjects/Components/HUD/Inventory/HumanInventoryInterfaceController.cs index fa59cf6ab9..ecc47ef5ef 100644 --- a/Content.Client/GameObjects/Components/HUD/Inventory/HumanInventoryInterfaceController.cs +++ b/Content.Client/GameObjects/Components/HUD/Inventory/HumanInventoryInterfaceController.cs @@ -43,7 +43,7 @@ namespace Content.Client.GameObjects base.Initialize(); _window = new HumanInventoryWindow(_loc, _resourceCache); - + _window.OnClose += () => GameHud.InventoryButtonDown = false; foreach (var (slot, button) in _window.Buttons) { button.OnPressed = AddToInventory;