summaryrefslogtreecommitdiff
path: root/src/rail_gui.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-07-10 22:03:09 +0000
committeryexo <yexo@openttd.org>2009-07-10 22:03:09 +0000
commit4843b3c45d7dac3dc3bde82b8b4b0cfd3c5924e1 (patch)
tree0aafd9c27a76258eea8875b3701c12a400811493 /src/rail_gui.cpp
parent58ee544cff63e5e1d684074d20e6476b72acf5c1 (diff)
downloadopenttd-4843b3c45d7dac3dc3bde82b8b4b0cfd3c5924e1.tar.xz
(svn r16789) -Codechange: unify the drawing of the Accepts/Supplies cargo lists in the station build windows.
Diffstat (limited to 'src/rail_gui.cpp')
-rw-r--r--src/rail_gui.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index dbd5e2638..c31b57e97 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -1063,11 +1063,13 @@ public:
DrawString(this->widget[BRSW_PLATFORM_LEN_1].left, this->widget[BRSW_PLATFORM_LEN_7].right, 101 + y_offset, STR_STATION_BUILD_PLATFORM_LENGTH, TC_FROMSTRING, SA_CENTER);
DrawString(this->widget[BRSW_PLATFORM_LEN_1].left, this->widget[BRSW_PLATFORM_LEN_7].right, 141 + y_offset, STR_STATION_BUILD_COVERAGE_AREA_TITLE, TC_FROMSTRING, SA_CENTER);
- int text_end = DrawStationCoverageAreaText(2, 166 + y_offset, SCT_ALL, rad, false);
- text_end = DrawStationCoverageAreaText(2, text_end + 4, SCT_ALL, rad, true) + 4;
- if (text_end != this->widget[BRSW_BACKGROUND].bottom) {
+ /* strings such as 'Size' and 'Coverage Area' */
+ int top = 166 + y_offset;
+ top = DrawStationCoverageAreaText(this->widget[BRSW_BACKGROUND].left + WD_FRAMERECT_LEFT, this->widget[BRSW_BACKGROUND].right - WD_FRAMERECT_RIGHT, top, SCT_ALL, 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_ALL, 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();
}