diff options
author | frosch <frosch@openttd.org> | 2009-06-01 08:35:35 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2009-06-01 08:35:35 +0000 |
commit | 5e91bf0ad20e0c60b31e190a1f02f184020238de (patch) | |
tree | 5d5f9dbc3c84006c94c7ea1bf03f003f6dc007fa /src | |
parent | ba9e014bdc06943a2b32a62e1046c60e845f8243 (diff) | |
download | openttd-5e91bf0ad20e0c60b31e190a1f02f184020238de.tar.xz |
(svn r16490) -Fix: Do not draw train details over the scrollbar.
Diffstat (limited to 'src')
-rw-r--r-- | src/vehicle_gui.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 077f108c0..3f6e67a1e 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -1504,16 +1504,17 @@ struct VehicleDetailsWindow : Window { SetDParam(1, v->date_of_last_service); DrawString(13, this->width - 2, this->height - (v->type != VEH_TRAIN ? 11 : 23), Company::Get(v->owner)->settings.vehicle.servint_ispercent ? STR_VEHICLE_DETAILS_SERVICING_INTERVAL_PERCENT : STR_VEHICLE_DETAILS_SERVICING_INTERVAL_DAYS); + const Widget *matrix = &this->widget[VLD_WIDGET_MIDDLE_DETAILS]; switch (v->type) { case VEH_TRAIN: - DrawVehicleDetails(v, 2, this->width - 2, 57, this->vscroll.pos, this->vscroll.cap, det_tab); + DrawVehicleDetails(v, matrix->left + 2, matrix->right - 2, matrix->top + 1, this->vscroll.pos, this->vscroll.cap, det_tab); break; case VEH_ROAD: case VEH_SHIP: case VEH_AIRCRAFT: - DrawVehicleImage(v, 3, 57, INVALID_VEHICLE, 0, 0); - DrawVehicleDetails(v, 75, this->width - 2, 57, this->vscroll.pos, this->vscroll.cap, det_tab); + DrawVehicleImage(v, matrix->left + 3, matrix->top + 1, INVALID_VEHICLE, 0, 0); + DrawVehicleDetails(v, matrix->left + 75, matrix->right - 2, matrix->top + 1, this->vscroll.pos, this->vscroll.cap, det_tab); break; default: NOT_REACHED(); |