From d70e89aff665d8786880f462b6602808a06e7e80 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Tue, 24 Dec 2019 17:52:16 +0100 Subject: [PATCH] fixed what I just did --- MLEM.Ui/Elements/Panel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }