Fix mod switcher icon handling.

This commit is contained in:
Paul Chote
2020-08-14 14:13:42 +01:00
committed by reaperrr
parent 3efac3287e
commit 960056d300

View File

@@ -217,23 +217,23 @@ namespace OpenRA.Mods.Common.Widgets.Logic
return mod.Icon; return mod.Icon;
}; };
}
if (logo != null && mod.Icon == null) if (mod.Icon == null)
{ {
// Hide the logo and center just the text // Hide the logo and center just the text
if (title != null) if (title != null)
title.Bounds.X = logo.Bounds.Left; title.Bounds.X = logo.Bounds.X;
if (version != null) if (version != null)
version.Bounds.X = logo.Bounds.X; version.Bounds.X = logo.Bounds.X;
width -= logo.Bounds.Width; width -= logo.Bounds.Width;
} }
else else
{ {
// Add an equal logo margin on the right of the text // Add an equal logo margin on the right of the text
width += logo.Bounds.Width; width += logo.Bounds.Width;
}
} }
var container = panel.GetOrNull("MOD_CONTAINER"); var container = panel.GetOrNull("MOD_CONTAINER");