diff options
author | frosch <frosch@openttd.org> | 2014-09-20 11:32:54 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2014-09-20 11:32:54 +0000 |
commit | c4fcc8d2aaac791f3a93c2433e6d30b4dc0e535a (patch) | |
tree | 9f796d983a623471677cf32226ee0dd478da49d3 /src | |
parent | e353ef5908456a08f6c00caa19d967c04d109764 (diff) | |
download | openttd-c4fcc8d2aaac791f3a93c2433e6d30b4dc0e535a.tar.xz |
(svn r26859) -Fix [FS#6119]: Height computation of game script text in town GUI did not consider margins.
Diffstat (limited to 'src')
-rw-r--r-- | src/town_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp index a2ac0bafe..2d9be9359 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -406,7 +406,7 @@ public: if (this->town->text != NULL) { SetDParamStr(0, this->town->text); - DrawStringMultiLine(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_LEFT, y += FONT_HEIGHT_NORMAL, UINT16_MAX, STR_JUST_RAW_STRING, TC_BLACK); + DrawStringMultiLine(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y += FONT_HEIGHT_NORMAL, UINT16_MAX, STR_JUST_RAW_STRING, TC_BLACK); } } @@ -484,7 +484,7 @@ public: if (this->town->text != NULL) { SetDParamStr(0, this->town->text); - aimed_height += GetStringHeight(STR_JUST_RAW_STRING, width); + aimed_height += GetStringHeight(STR_JUST_RAW_STRING, width - WD_FRAMERECT_LEFT - WD_FRAMERECT_RIGHT); } return aimed_height; |