From b90b3095a6f6619312dd154e81d7c95418b2e801 Mon Sep 17 00:00:00 2001 From: teinarss Date: Tue, 16 Apr 2019 20:24:26 +0200 Subject: [PATCH] Updated ColorBlockWidget to handle setting the Color in yaml --- OpenRA.Mods.Common/Widgets/ColorBlockWidget.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Widgets/ColorBlockWidget.cs b/OpenRA.Mods.Common/Widgets/ColorBlockWidget.cs index af906cac31..565dd5a7ec 100644 --- a/OpenRA.Mods.Common/Widgets/ColorBlockWidget.cs +++ b/OpenRA.Mods.Common/Widgets/ColorBlockWidget.cs @@ -17,14 +17,14 @@ namespace OpenRA.Mods.Common.Widgets { public class ColorBlockWidget : Widget { + public Color Color { get; set; } public Func GetColor; - public Action OnMouseDown = _ => { }; public Action OnMouseUp = _ => { }; public ColorBlockWidget() { - GetColor = () => Color.White; + GetColor = () => Color; } protected ColorBlockWidget(ColorBlockWidget widget)