diff options
author | yexo <yexo@openttd.org> | 2009-07-10 22:03:09 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2009-07-10 22:03:09 +0000 |
commit | 4843b3c45d7dac3dc3bde82b8b4b0cfd3c5924e1 (patch) | |
tree | 0aafd9c27a76258eea8875b3701c12a400811493 /src/road_gui.cpp | |
parent | 58ee544cff63e5e1d684074d20e6476b72acf5c1 (diff) | |
download | openttd-4843b3c45d7dac3dc3bde82b8b4b0cfd3c5924e1.tar.xz |
(svn r16789) -Codechange: unify the drawing of the Accepts/Supplies cargo lists in the station build windows.
Diffstat (limited to 'src/road_gui.cpp')
-rw-r--r-- | src/road_gui.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/road_gui.cpp b/src/road_gui.cpp index 302da2086..cb7155f92 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -955,15 +955,14 @@ struct BuildRoadStationWindow : public PickerWindowBase { StationPickerDrawSprite(171, 35, st, INVALID_RAILTYPE, _cur_roadtype, 4); StationPickerDrawSprite(171, 85, st, INVALID_RAILTYPE, _cur_roadtype, 5); - int text_end = DrawStationCoverageAreaText(2, 147, - (this->window_class == WC_BUS_STATION) ? SCT_PASSENGERS_ONLY : SCT_NON_PASSENGERS_ONLY, - rad, false); - text_end = DrawStationCoverageAreaText(2, text_end + 4, - (this->window_class == WC_BUS_STATION) ? SCT_PASSENGERS_ONLY : SCT_NON_PASSENGERS_ONLY, - rad, true) + 4; - if (text_end > this->widget[BRSW_BACKGROUND].bottom) { + /* strings such as 'Size' and 'Coverage Area' */ + StationCoverageType sct = (this->window_class == WC_BUS_STATION) ? SCT_PASSENGERS_ONLY : SCT_NON_PASSENGERS_ONLY; + int top = 147; + top = DrawStationCoverageAreaText(this->widget[BRSW_BACKGROUND].left + WD_FRAMERECT_LEFT, this->widget[BRSW_BACKGROUND].right - WD_FRAMERECT_RIGHT, top, sct, rad, false) + WD_PAR_VSEP_NORMAL; + top = DrawStationCoverageAreaText(this->widget[BRSW_BACKGROUND].left + WD_FRAMERECT_LEFT, this->widget[BRSW_BACKGROUND].right - WD_FRAMERECT_RIGHT, top, sct, rad, true) + WD_PAR_VSEP_NORMAL; + if (top != this->widget[BRSW_BACKGROUND].bottom) { this->SetDirty(); - ResizeWindowForWidget(this, BRSW_BACKGROUND, 0, text_end - this->widget[BRSW_BACKGROUND].bottom); + ResizeWindowForWidget(this, BRSW_BACKGROUND, 0, top - this->widget[BRSW_BACKGROUND].bottom); this->SetDirty(); } } |