(svn r26859) -Fix [FS#6119]: Height computation of game script text in town GUI did not consider margins.

This commit is contained in:
frosch 2014-09-20 11:32:54 +00:00
parent e353ef5908
commit c4fcc8d2aa
1 changed files with 2 additions and 2 deletions

View File

@ -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;