From f6c38e291208e840d9cb7874435f97b40ba08ba4 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Mon, 28 Oct 2019 21:03:16 +0100 Subject: [PATCH] Display chac as long as there is screen space for it --- Source/plrmsg.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Source/plrmsg.cpp b/Source/plrmsg.cpp index ea0b914f4..8539fe35f 100644 --- a/Source/plrmsg.cpp +++ b/Source/plrmsg.cpp @@ -85,16 +85,21 @@ void DrawPlrMsg() int i; DWORD x = 74; DWORD y = 230; - DWORD width = 620; + DWORD width = SCREEN_WIDTH - 20; _plrmsg *pMsg; if (chrflag || questlog) { - if (invflag || sbookflag) - return; x = 394; - width = 300; - } else if (invflag || sbookflag) - width = 300; + width -= 300; + } + if (invflag || sbookflag) + width -= 300; + + if (width < 300) + return; + + if (width > 620) + width = 620; pMsg = plr_msgs; for (i = 0; i < 8; i++) {