(svn r26640) -Cleanup: Remove some pointless STR_JUST_STRING detours.
This commit is contained in:
@@ -1040,8 +1040,7 @@ public:
|
||||
Dimension d = {0, 0};
|
||||
for (uint i = 0; i < StationClass::GetClassCount(); i++) {
|
||||
if (i == STAT_CLASS_WAYP) continue;
|
||||
SetDParam(0, StationClass::Get((StationClassID)i)->name);
|
||||
d = maxdim(d, GetStringBoundingBox(STR_BLACK_STRING));
|
||||
d = maxdim(d, GetStringBoundingBox(StationClass::Get((StationClassID)i)->name));
|
||||
}
|
||||
size->width = max(size->width, d.width + padding.width);
|
||||
this->line_height = FONT_HEIGHT_NORMAL + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
||||
@@ -1119,8 +1118,8 @@ public:
|
||||
for (uint i = 0; i < StationClass::GetClassCount(); i++) {
|
||||
if (i == STAT_CLASS_WAYP) continue;
|
||||
if (this->vscroll->IsVisible(statclass)) {
|
||||
SetDParam(0, StationClass::Get((StationClassID)i)->name);
|
||||
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, row * this->line_height + r.top + WD_MATRIX_TOP, STR_JUST_STRING,
|
||||
DrawString(r.left + WD_MATRIX_LEFT, r.right - WD_MATRIX_RIGHT, row * this->line_height + r.top + WD_MATRIX_TOP,
|
||||
StationClass::Get((StationClassID)i)->name,
|
||||
(StationClassID)i == _railstation.station_class ? TC_WHITE : TC_BLACK);
|
||||
row++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user