From 1ac679a8a25d63c80fd5ae5acb0f9ee636eee049 Mon Sep 17 00:00:00 2001 From: Yannick Yannick Date: Wed, 17 Apr 2024 12:24:44 +0200 Subject: [PATCH] fix panel header icon texture check --- Blish HUD/Controls/Panel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Blish HUD/Controls/Panel.cs b/Blish HUD/Controls/Panel.cs index 2468ee583..629d5a881 100644 --- a/Blish HUD/Controls/Panel.cs +++ b/Blish HUD/Controls/Panel.cs @@ -256,7 +256,7 @@ public override void RecalculateLayout() { _layoutHeaderBounds = new Rectangle(this.ContentRegion.Left, 0, this.ContentRegion.Width, HEADER_HEIGHT); - if (_icon?.HasTexture != null) { + if (_icon?.HasTexture == true) { _layoutHeaderIconBounds = new Rectangle(_layoutHeaderBounds.Left + 3, 3, HEADER_HEIGHT - 6, HEADER_HEIGHT - 6); _layoutHeaderTextBounds = new Rectangle(_layoutHeaderIconBounds.Right + 5, 0, _layoutHeaderBounds.Width - _layoutHeaderIconBounds.Width, HEADER_HEIGHT); @@ -352,7 +352,7 @@ public override void PaintBeforeChildren(SpriteBatch spriteBatch, Rectangle boun } // Panel header icon - if (_icon?.HasTexture != null) { + if (_icon?.HasTexture == true) { spriteBatch.DrawOnCtrl(this, _icon, _layoutHeaderIconBounds, Color.White); }