diff --git a/MLEM.Ui/Elements/Panel.cs b/MLEM.Ui/Elements/Panel.cs index b6c23ca..666268a 100644 --- a/MLEM.Ui/Elements/Panel.cs +++ b/MLEM.Ui/Elements/Panel.cs @@ -22,6 +22,11 @@ namespace MLEM.Ui.Elements { /// public StyleProp Texture; /// + /// The color that this panel's should be drawn with. + /// If this style property has no value, is used. + /// + public StyleProp DrawColor; + /// /// The scroll bar that this panel contains. /// This is only nonnull if is true. /// @@ -154,7 +159,7 @@ namespace MLEM.Ui.Elements { /// public override void Draw(GameTime time, SpriteBatch batch, float alpha, BlendState blendState, SamplerState samplerState, Matrix matrix) { if (this.Texture.HasValue()) - batch.Draw(this.Texture, this.DisplayArea, Color.White * alpha, this.Scale); + batch.Draw(this.Texture, this.DisplayArea, this.DrawColor.OrDefault(Color.White) * alpha, this.Scale); // if we handle overflow, draw using the render target in DrawUnbound if (!this.scrollOverflow || this.renderTarget == null) { base.Draw(time, batch, alpha, blendState, samplerState, matrix);