From 037ef082b4f9efba0fc7f4e363257577326faa64 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 3 Mar 2021 20:08:14 +0100 Subject: [PATCH] :bug: Correct position of dialog backgrounds Fixes #1098 --- Source/error.cpp | 2 +- Source/items.cpp | 2 +- Source/minitext.cpp | 2 +- Source/stores.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/error.cpp b/Source/error.cpp index 79e88455d..99dfcad6d 100644 --- a/Source/error.cpp +++ b/Source/error.cpp @@ -126,7 +126,7 @@ void DrawDiabloMsg(CelOutputBuffer out) assert(gpBuffer); - DrawHalfTransparentRectTo(out, PANEL_LEFT + 104, DIALOG_TOP - 8, 432, 54); + DrawHalfTransparentRectTo(out, PANEL_X + 104, DIALOG_Y - 8, 432, 54); strcpy(tempstr, MsgStrings[msgflag]); sx = PANEL_X + 101; diff --git a/Source/items.cpp b/Source/items.cpp index 4d63bfd01..a8510af2d 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -3957,7 +3957,7 @@ void PrintItemPower(char plidx, ItemStruct *x) static void DrawUTextBack(CelOutputBuffer out) { CelDrawTo(out, RIGHT_PANEL_X - SPANEL_WIDTH + 24, SCREEN_Y + 327, pSTextBoxCels, 1, 271); - DrawHalfTransparentRectTo(out, RIGHT_PANEL - SPANEL_WIDTH + 27, 28, 265, 297); + DrawHalfTransparentRectTo(out, RIGHT_PANEL_X - SPANEL_WIDTH + 27, SCREEN_Y + 28, 265, 297); } void PrintUString(CelOutputBuffer out, int x, int y, BOOL cjustflag, const char *str, int col) diff --git a/Source/minitext.cpp b/Source/minitext.cpp index 4247e7801..89b4f5f0e 100644 --- a/Source/minitext.cpp +++ b/Source/minitext.cpp @@ -251,7 +251,7 @@ void InitQTextMsg(int m) void DrawQTextBack(CelOutputBuffer out) { CelDrawTo(out, PANEL_X + 24, SCREEN_Y + 327 + UI_OFFSET_Y, pTextBoxCels, 1, 591); - DrawHalfTransparentRectTo(out, PANEL_LEFT + 27, UI_OFFSET_Y + 28, 585, 297); + DrawHalfTransparentRectTo(out, PANEL_X + 27, SCREEN_Y + UI_OFFSET_Y + 28, 585, 297); } void DrawQText(CelOutputBuffer out) diff --git a/Source/stores.cpp b/Source/stores.cpp index d923e1a3e..78a1ba0cc 100644 --- a/Source/stores.cpp +++ b/Source/stores.cpp @@ -121,7 +121,7 @@ void FreeStoreMem() static void DrawSTextBack(CelOutputBuffer out) { CelDrawTo(out, PANEL_X + 344, 327 + SCREEN_Y + UI_OFFSET_Y, pSTextBoxCels, 1, 271); - DrawHalfTransparentRectTo(out, PANEL_LEFT + 347, UI_OFFSET_Y + 28, 265, 297); + DrawHalfTransparentRectTo(out, PANEL_X + 347, SCREEN_Y + UI_OFFSET_Y + 28, 265, 297); } void PrintSString(CelOutputBuffer out, int x, int y, BOOL cjustflag, const char *str, char col, int val)