diff options
author | bjarni <bjarni@openttd.org> | 2007-01-22 02:09:51 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2007-01-22 02:09:51 +0000 |
commit | 6ccbfffbeabf2c7c814a5b251265201f86581571 (patch) | |
tree | 1f61292e8f2a6f5505daf3630655f44b8c653f16 /src/vehicle_gui.cpp | |
parent | cf0e5816d6ea6e625803fa3597a74c8f75e98d5e (diff) | |
download | openttd-6ccbfffbeabf2c7c814a5b251265201f86581571.tar.xz |
(svn r8338) -Codechange: merged road vehicle build window into the other ones
Note: now all build vehicle windows are merged into build_vehicle_gui.cpp
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r-- | src/vehicle_gui.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index fa88841ff..9a6db3267 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -1045,19 +1045,6 @@ static void DrawEngineArrayInReplaceWindow(Window *w, int x, int y, int x2, int } } -static void DrawVehiclePurchaseInfoLocal(const int x, const int y, uint w, const EngineID engine_number) -{ - switch (GetEngine(engine_number)->type) { - case VEH_Road: DrawRoadVehPurchaseInfo(x, y, w, engine_number); break; - case VEH_Ship: - case VEH_Train: - case VEH_Aircraft: - DrawVehiclePurchaseInfo(x, y, w, engine_number); - break; - default: NOT_REACHED(); - } -} - static void ReplaceVehicleWndProc(Window *w, WindowEvent *e) { static const StringID _vehicle_type_names[] = { @@ -1141,7 +1128,7 @@ static void ReplaceVehicleWndProc(Window *w, WindowEvent *e) for (i = 0 ; i < 2 ; i++) { if (selected_id[i] != INVALID_ENGINE) { const Widget *wi = &w->widget[i == 0 ? 3 : 11]; - DrawVehiclePurchaseInfoLocal(wi->left + 2 , wi->top + 1, wi->right - wi->left - 2, selected_id[i]); + DrawVehiclePurchaseInfo(wi->left + 2 , wi->top + 1, wi->right - wi->left - 2, selected_id[i]); } } } break; // end of paint @@ -1737,12 +1724,7 @@ void PlayerVehWndProc(Window *w, WindowEvent *e) } break; case VLW_WIDGET_NEW_VEHICLES: - switch (vl->vehicle_type) { - case VEH_Road: ShowBuildRoadVehWindow(0); break; - case VEH_Ship: - case VEH_Train: - case VEH_Aircraft: ShowBuildVehicleWindow(0, vl->vehicle_type); break; - } + ShowBuildVehicleWindow(0, vl->vehicle_type); break; case VLW_WIDGET_MANAGE_VEHICLES: |