diff options
author | rubidium <rubidium@openttd.org> | 2008-07-12 22:28:34 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-07-12 22:28:34 +0000 |
commit | e74743227b4728b7d6627cb440ea70a6cab22c1d (patch) | |
tree | beda6413aaeba17e1a7e7d797f71bad557bc0b61 /src | |
parent | 2b6dee7f64b81785d4e5ec16d1dddfa74a562a57 (diff) | |
download | openttd-e74743227b4728b7d6627cb440ea70a6cab22c1d.tar.xz |
(svn r13694) -Change: make it more explicit that you've opened the available train/ship/etc. list instead of the one where you can actually build vehicles by setting the appropriate title for the window.
Diffstat (limited to 'src')
-rw-r--r-- | src/build_vehicle_gui.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index 23e075a9a..828a604da 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -856,11 +856,12 @@ struct BuildVehicleWindow : Window { /* Setup widget strings to fit the different types of vehicles */ void SetupWindowStrings(VehicleType type) { + bool available_vehicle = this->window_number <= VEH_END; switch (type) { default: NOT_REACHED(); case VEH_TRAIN: - this->widget[BUILD_VEHICLE_WIDGET_CAPTION].data = STR_JUST_STRING; + this->widget[BUILD_VEHICLE_WIDGET_CAPTION].data = available_vehicle ? STR_AVAILABLE_TRAINS : STR_JUST_STRING; this->widget[BUILD_VEHICLE_WIDGET_LIST].tooltips = STR_8843_TRAIN_VEHICLE_SELECTION; this->widget[BUILD_VEHICLE_WIDGET_BUILD].data = STR_881F_BUILD_VEHICLE; this->widget[BUILD_VEHICLE_WIDGET_BUILD].tooltips = STR_8844_BUILD_THE_HIGHLIGHTED_TRAIN; @@ -869,7 +870,7 @@ struct BuildVehicleWindow : Window { break; case VEH_ROAD: - this->widget[BUILD_VEHICLE_WIDGET_CAPTION].data = STR_9006_NEW_ROAD_VEHICLES; + this->widget[BUILD_VEHICLE_WIDGET_CAPTION].data = available_vehicle ? STR_AVAILABLE_ROAD_VEHICLES : STR_9006_NEW_ROAD_VEHICLES; this->widget[BUILD_VEHICLE_WIDGET_LIST].tooltips = STR_9026_ROAD_VEHICLE_SELECTION; this->widget[BUILD_VEHICLE_WIDGET_BUILD].data = STR_9007_BUILD_VEHICLE; this->widget[BUILD_VEHICLE_WIDGET_BUILD].tooltips = STR_9027_BUILD_THE_HIGHLIGHTED_ROAD; @@ -878,7 +879,7 @@ struct BuildVehicleWindow : Window { break; case VEH_SHIP: - this->widget[BUILD_VEHICLE_WIDGET_CAPTION].data = STR_9808_NEW_SHIPS; + this->widget[BUILD_VEHICLE_WIDGET_CAPTION].data = available_vehicle ? STR_AVAILABLE_SHIPS : STR_9808_NEW_SHIPS; this->widget[BUILD_VEHICLE_WIDGET_LIST].tooltips = STR_9825_SHIP_SELECTION_LIST_CLICK; this->widget[BUILD_VEHICLE_WIDGET_BUILD].data = STR_9809_BUILD_SHIP; this->widget[BUILD_VEHICLE_WIDGET_BUILD].tooltips = STR_9826_BUILD_THE_HIGHLIGHTED_SHIP; @@ -887,7 +888,7 @@ struct BuildVehicleWindow : Window { break; case VEH_AIRCRAFT: - this->widget[BUILD_VEHICLE_WIDGET_CAPTION].data = STR_A005_NEW_AIRCRAFT; + this->widget[BUILD_VEHICLE_WIDGET_CAPTION].data = available_vehicle ? STR_AVAILABLE_AIRCRAFT : STR_A005_NEW_AIRCRAFT; this->widget[BUILD_VEHICLE_WIDGET_LIST].tooltips = STR_A025_AIRCRAFT_SELECTION_LIST; this->widget[BUILD_VEHICLE_WIDGET_BUILD].data = STR_A006_BUILD_AIRCRAFT; this->widget[BUILD_VEHICLE_WIDGET_BUILD].tooltips = STR_A026_BUILD_THE_HIGHLIGHTED_AIRCRAFT; |