diff --git a/MLEM.Ui/Elements/Panel.cs b/MLEM.Ui/Elements/Panel.cs index 452e454..906f15f 100644 --- a/MLEM.Ui/Elements/Panel.cs +++ b/MLEM.Ui/Elements/Panel.cs @@ -135,9 +135,9 @@ namespace MLEM.Ui.Elements { if (this.Texture.Value != null) batch.Draw(this.Texture, this.DisplayArea, Color.White * alpha, this.Scale); // if we handle overflow, draw using the render target in DrawUnbound - if (!this.scrollOverflow) { + if (!this.scrollOverflow || this.renderTarget == null) { base.Draw(time, batch, alpha, blendState, samplerState, matrix); - } else if (this.renderTarget != null) { + } else { // draw the actual render target (don't apply the alpha here because it's already drawn onto with alpha) batch.Draw(this.renderTarget, this.GetRenderTargetArea(), Color.White); }