From 943ad70a052a8bb4f16016cc4b6e17c175b534d3 Mon Sep 17 00:00:00 2001 From: Alexander Guryanov Date: Tue, 11 Oct 2022 15:15:20 +0300 Subject: [PATCH] Fix #605: center tabutask & ending texts --- src/actint/actint.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/actint/actint.cpp b/src/actint/actint.cpp index 66c3569a..e984445b 100644 --- a/src/actint/actint.cpp +++ b/src/actint/actint.cpp @@ -9666,10 +9666,13 @@ void aciScreenText::redraw(void) p = (aciScreenTextPage*)p -> next; } - y = (XGR_MAXY - (DeltaY + aTextHeight32((void *)"",font,1)) * p -> NumStr)/2; + + int screenSizeX = XGR_Obj.get_is_scaled_renderer() ? I_RES_X : XGR_MAXX; + int screenSizeY = XGR_Obj.get_is_scaled_renderer() ? I_RES_Y : XGR_MAXY; + y = (screenSizeY - (DeltaY + aTextHeight32((void *)"",font,1)) * p -> NumStr)/2; for(i = 0; i < CurStr; i ++){ str = p -> StrTable[i]; - x = (XGR_MAXX - aTextWidth32(str,font,1))/2; + x = (screenSizeX - aTextWidth32(str,font,1))/2; aOutText32(x,y,color,str,font,1,1); y += DeltaY + aTextHeight32(str,font,1);