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
This commit is contained in:
DamianX
2019-08-16 21:52:00 +02:00
committed by Pieter-Jan Briers
parent 73dc55d8ef
commit 534af65f7c

View File

@@ -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;