From d2f02e7a4b7fed3aad7b4cb4e2618f25130b7653 Mon Sep 17 00:00:00 2001 From: WolfGaming Date: Fri, 6 Mar 2015 21:56:56 +0000 Subject: [PATCH] Fix missions showing tooltips wrong. --- .../Widgets/Logic/Ingame/WorldTooltipLogic.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OpenRA.Mods.Common/Widgets/Logic/Ingame/WorldTooltipLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Ingame/WorldTooltipLogic.cs index 0d39760a31..bb9b2aaddf 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Ingame/WorldTooltipLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Ingame/WorldTooltipLogic.cs @@ -39,6 +39,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic var singleHeight = widget.Get("SINGLE_HEIGHT").Bounds.Height; var doubleHeight = widget.Get("DOUBLE_HEIGHT").Bounds.Height; + var extraHeightOnDouble = extras.Bounds.Y; + var extraHeightOnSingle = extraHeightOnDouble - (doubleHeight - singleHeight); tooltipContainer.BeforeRender = () => { @@ -114,6 +116,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic if (extraText != "") { widget.Bounds.Height += font.Measure(extraText).Y + extras.Bounds.Height; + if (showOwner) + extras.Bounds.Y = extraHeightOnDouble; + else + extras.Bounds.Y = extraHeightOnSingle; } };