diff options
author | peter1138 <peter1138@openttd.org> | 2014-10-04 18:19:22 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2014-10-04 18:19:22 +0000 |
commit | d4a9b3acedb52bfe6d59aec6fe9c2a83996f066d (patch) | |
tree | 64e14032f955438370f7221168b96d9ea4d14a5a /src/ai | |
parent | 49a4a5958dd903974d8c0785797f085926b4a97d (diff) | |
download | openttd-d4a9b3acedb52bfe6d59aec6fe9c2a83996f066d.tar.xz |
(svn r26954) -Codechange: GUI-scale for AI/GS settings and NewGRF settings windows.
Diffstat (limited to 'src/ai')
-rw-r--r-- | src/ai/ai_gui.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index 2c1051f05..082123685 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -346,7 +346,7 @@ struct AISettingsWindow : public Window { virtual void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) { if (widget == WID_AIS_BACKGROUND) { - this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM; + this->line_height = max(SETTING_BUTTON_HEIGHT, FONT_HEIGHT_NORMAL) + WD_MATRIX_TOP + WD_MATRIX_BOTTOM; resize->width = 1; resize->height = this->line_height; @@ -371,6 +371,7 @@ struct AISettingsWindow : public Window { int y = r.top; int button_y_offset = (this->line_height - SETTING_BUTTON_HEIGHT) / 2; + int text_y_offset = (this->line_height - FONT_HEIGHT_NORMAL) / 2; for (; this->vscroll->IsVisible(i) && it != visible_settings.end(); i++, it++) { const ScriptConfigItem &config_item = **it; int current_value = config->GetSetting((config_item).name); @@ -412,7 +413,7 @@ struct AISettingsWindow : public Window { } } - DrawString(text_left, text_right, y + WD_MATRIX_TOP, str, colour); + DrawString(text_left, text_right, y + text_y_offset, str, colour); y += this->line_height; } } |