# HG changeset patch # User frosch # Date 2014-09-20 11:32:54 # Node ID d892747529d15d56fc655f4892a8450f0a6228f1 # Parent 7a10dc52833b0468d30ee2ca0b314c423c780133 (svn r26859) -Fix [FS#6119]: Height computation of game script text in town GUI did not consider margins. diff --git a/src/town_gui.cpp b/src/town_gui.cpp --- 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;