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/dock_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/dock_gui.cpp')
-rw-r--r-- | src/dock_gui.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp index 46ce1db29..cad78f3df 100644 --- a/src/dock_gui.cpp +++ b/src/dock_gui.cpp @@ -402,11 +402,13 @@ public: SetTileSelectSize(1, 1); } - int text_end = DrawStationCoverageAreaText(4, 50, SCT_ALL, rad, false); - text_end = DrawStationCoverageAreaText(4, text_end + 4, SCT_ALL, rad, true) + 4; - if (text_end != this->widget[BDSW_BACKGROUND].bottom) { + /* strings such as 'Size' and 'Coverage Area' */ + int top = this->widget[BDSW_LT_OFF].bottom + WD_PAR_VSEP_NORMAL; + top = DrawStationCoverageAreaText(this->widget[BDSW_BACKGROUND].left + WD_FRAMERECT_LEFT, this->widget[BDSW_BACKGROUND].right - WD_FRAMERECT_RIGHT, top, SCT_ALL, rad, false) + WD_PAR_VSEP_NORMAL; + top = DrawStationCoverageAreaText(this->widget[BDSW_BACKGROUND].left + WD_FRAMERECT_LEFT, this->widget[BDSW_BACKGROUND].right - WD_FRAMERECT_RIGHT, top, SCT_ALL, rad, true) + WD_PAR_VSEP_NORMAL; + if (top != this->widget[BDSW_BACKGROUND].bottom) { this->SetDirty(); - ResizeWindowForWidget(this, 2, 0, text_end - this->widget[BDSW_BACKGROUND].bottom); + ResizeWindowForWidget(this, BDSW_BACKGROUND, 0, top - this->widget[BDSW_BACKGROUND].bottom); this->SetDirty(); } } |