Changeset - r21716:d892747529d1
[Not reviewed]
master
0 1 0
frosch - 10 years ago 2014-09-20 11:32:54
frosch@openttd.org
(svn r26859) -Fix [FS#6119]: Height computation of game script text in town GUI did not consider margins.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/town_gui.cpp
Show inline comments
 
@@ -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;
0 comments (0 inline, 0 general)