From 06678ecc0da5fb55400a31c7b9adbee1e3eca5c9 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Wed, 13 Jan 2016 23:28:51 +0000 Subject: [PATCH] Cancel custom input modes when opening the menu. --- .../Widgets/Logic/Ingame/MenuButtonsChromeLogic.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/MenuButtonsChromeLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/MenuButtonsChromeLogic.cs index 334b68d868..25de9fc1ff 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/MenuButtonsChromeLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/MenuButtonsChromeLogic.cs @@ -98,7 +98,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic var cachedPause = world.PredictedPaused; if (button.HideIngameUI) + { + // Cancel custom input modes (guard, building placement, etc) + world.CancelInputMode(); + worldRoot.IsVisible = () => false; + } if (button.Pause && world.LobbyInfo.IsSinglePlayer) world.SetPauseState(true);