Don't render empty background images

This commit is contained in:
abcdefg30
2018-01-20 23:53:59 +01:00
committed by reaperrr
parent 0e0ab318e6
commit 0f1cd07dee

View File

@@ -254,6 +254,9 @@ namespace OpenRA.Mods.Common.Widgets
public static void DrawBackground(string baseName, Rectangle rect, bool disabled, bool pressed, bool hover, bool highlighted)
{
if (string.IsNullOrEmpty(baseName))
return;
var variant = highlighted ? "-highlighted" : "";
var state = disabled ? "-disabled" :
pressed ? "-pressed" :