From 0982762c2278a3c89297d4f763f2b65e4a22c908 Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 9 Aug 2015 10:21:06 +0000 Subject: (svn r27365) -Fix: Center settings filter warning also vertically, and also in case of multiple lines. --- src/settings_gui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index f1af4804e..19949671f 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -1883,13 +1883,13 @@ struct GameSettingsWindow : Window { if (this->warn_missing != WHR_NONE) { const int left = panel->pos_x; const int right = left + panel->current_x - 1; - const int top = panel->pos_y; + const int top = panel->pos_y + WD_FRAMETEXT_TOP + (SETTING_HEIGHT - FONT_HEIGHT_NORMAL) * this->warn_lines / 2; SetDParam(0, _game_settings_restrict_dropdown[this->filter.min_cat]); if (this->warn_lines == 1) { /* If the warning fits at one line, center it. */ - DrawString(left + WD_FRAMETEXT_LEFT, right - WD_FRAMETEXT_RIGHT, top + WD_FRAMETEXT_TOP, warn_str, TC_FROMSTRING, SA_HOR_CENTER); + DrawString(left + WD_FRAMETEXT_LEFT, right - WD_FRAMETEXT_RIGHT, top, warn_str, TC_FROMSTRING, SA_HOR_CENTER); } else { - DrawStringMultiLine(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top + WD_FRAMERECT_TOP, INT32_MAX, warn_str); + DrawStringMultiLine(left + WD_FRAMERECT_LEFT, right - WD_FRAMERECT_RIGHT, top, INT32_MAX, warn_str, TC_FROMSTRING, SA_HOR_CENTER); } } } -- cgit v1.2.3-70-g09d2