From f09a065da588187ffa4db4df26a00dee18a275b9 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Tue, 26 Oct 2021 01:10:08 +0200 Subject: [PATCH] Fix chat position in relation to dynamic panels --- Source/plrmsg.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/plrmsg.cpp b/Source/plrmsg.cpp index 0b4cd6683..7c23421f3 100644 --- a/Source/plrmsg.cpp +++ b/Source/plrmsg.cpp @@ -107,17 +107,17 @@ void InitPlrMsg() void DrawPlrMsg(const Surface &out) { - DWORD x = 10; - DWORD y = 58; - DWORD width = gnScreenWidth - 20; + int x = 10; + int y = 58; + int width = gnScreenWidth - 20; _plrmsg *pMsg; if (chrflag || QuestLogIsOpen) { - x += SPANEL_WIDTH; - width -= SPANEL_WIDTH; + x += LeftPanel.position.x + LeftPanel.size.width; + width -= LeftPanel.size.width; } if (invflag || sbookflag) - width -= SPANEL_WIDTH; + width -= gnScreenWidth - RightPanel.position.x; if (width < 300) return;