(svn r19911) -Codechange: Simplify text drawing by eliminating global variables and side effects. This also fixes the 'colour' parameter of DrawStringMultiLine().

This commit is contained in:
frosch
2010-05-30 15:32:37 +00:00
parent 2224c9b515
commit 4b7afccd46
3 changed files with 56 additions and 55 deletions

View File

@@ -1187,9 +1187,7 @@ void ViewportSign::UpdatePosition(int center, int top, StringID str)
this->center = center;
/* zoomed out version */
_cur_fontsize = FS_SMALL;
this->width_small = VPSM_LEFT + Align(GetStringBoundingBox(buffer).width, 2) + VPSM_RIGHT;
_cur_fontsize = FS_NORMAL;
this->width_small = VPSM_LEFT + Align(GetStringBoundingBox(buffer, FS_SMALL).width, 2) + VPSM_RIGHT;
this->MarkDirty();
}