Don't render empty background images
This commit is contained in:
@@ -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)
|
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 variant = highlighted ? "-highlighted" : "";
|
||||||
var state = disabled ? "-disabled" :
|
var state = disabled ? "-disabled" :
|
||||||
pressed ? "-pressed" :
|
pressed ? "-pressed" :
|
||||||
|
|||||||
Reference in New Issue
Block a user