From 42c4c7b7eb38cd0f9a5332d7835542724e2dab67 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 15 Sep 2017 22:32:11 +0100 Subject: [PATCH] Fix compile error in CommandBarLogic. --- .../Widgets/Logic/Ingame/CommandBarLogic.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/CommandBarLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/CommandBarLogic.cs index dc3fff3cec..32d5ff28c2 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/CommandBarLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/CommandBarLogic.cs @@ -205,18 +205,18 @@ namespace OpenRA.Mods.Common.Widgets var keyOverrides = widget.GetOrNull("MODIFIER_OVERRIDES"); if (keyOverrides != null) { - keyOverrides.OnKeyPress = ki => + keyOverrides.AddHandler(e => { // HACK: enable attack move to be triggered if the ctrl key is pressed - var modified = new Hotkey(ki.Key, ki.Modifiers & ~Modifiers.Ctrl); + var modified = new Hotkey(e.Key, e.Modifiers & ~Modifiers.Ctrl); if (attackMoveButton.Key.GetValue() == modified) { - attackMoveButton.OnKeyPress(ki); + attackMoveButton.OnKeyPress(e); return true; } return false; - }; + }); } }