From 287bbbe617401ad2a7d577094e181cef5f0d4dd5 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Thu, 22 May 2003 22:02:56 +0000 Subject: [PATCH] Actually, honestly, really and truely fix WIN_L2R centering. --- src/uifc/uifc32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uifc/uifc32.c b/src/uifc/uifc32.c index f390c21d94..05a47927aa 100644 --- a/src/uifc/uifc32.c +++ b/src/uifc/uifc32.c @@ -403,7 +403,7 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar } } if(mode&WIN_L2R) - left=(s_right-s_left+1)/2-(width/2)+(s_left); + left=(api->scrn_width-width)/2-s_left+1; else if(mode&WIN_RHT) left=api->scrn_width-(width+4+left); if(mode&WIN_T2B) @@ -1143,7 +1143,7 @@ int uinput(int mode, int left, int top, char *prompt, char *str, if(mode&WIN_T2B) top=(api->scrn_len/2)-(height/2)-2; if(mode&WIN_L2R) - left=(s_right-s_left+1)/2-(width/2)+(s_left); + left=(api->scrn_width-width)/2-SCRN_LEFT+1; if(mode&WIN_SAV) gettext(SCRN_LEFT+left,SCRN_TOP+top,SCRN_LEFT+left+width+1 ,SCRN_TOP+top+height,save_buf); -- GitLab