From 31294f1873fcf330d68a89a688c7243111560e47 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 6 Dec 2019 21:18:43 +0100 Subject: [PATCH] added default color to button --- MLEM.Ui/Elements/Button.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MLEM.Ui/Elements/Button.cs b/MLEM.Ui/Elements/Button.cs index 02541d4..f4db2ca 100644 --- a/MLEM.Ui/Elements/Button.cs +++ b/MLEM.Ui/Elements/Button.cs @@ -8,6 +8,7 @@ namespace MLEM.Ui.Elements { public class Button : Element { public StyleProp Texture; + public StyleProp NormalColor = Color.White; public StyleProp HoveredTexture; public StyleProp HoveredColor; public Paragraph Text; @@ -24,7 +25,7 @@ namespace MLEM.Ui.Elements { public override void Draw(GameTime time, SpriteBatch batch, float alpha, BlendState blendState, SamplerState samplerState, Matrix matrix) { var tex = this.Texture; - var color = Color.White * alpha; + var color = (Color) this.NormalColor * alpha; if (this.IsMouseOver) { tex = this.HoveredTexture.OrDefault(tex); color = (Color) this.HoveredColor * alpha;