diff options
author | frosch <frosch@openttd.org> | 2014-06-10 16:37:25 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2014-06-10 16:37:25 +0000 |
commit | 1b0929a9f04d94d40962cf49a682f1e3f8f800fd (patch) | |
tree | c959248f6820bc4946b8eea8b2173e72478652bc /src/rail_gui.cpp | |
parent | 4d2107bd618ea56e5ee0ac1e7db1aa0b88b6551d (diff) | |
download | openttd-1b0929a9f04d94d40962cf49a682f1e3f8f800fd.tar.xz |
(svn r26640) -Cleanup: Remove some pointless STR_JUST_STRING detours.
Diffstat (limited to 'src/rail_gui.cpp')
-rw-r--r-- | src/rail_gui.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index d07bb5520..1907c6617 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -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++; } |