From 0513a6ccb05154c7bd4a725077fbc721c6b66353 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Mon, 8 May 2023 09:09:34 +0100 Subject: [PATCH] Change: Use separate names for default stations/roadstops. --- src/lang/english.txt | 4 +++- src/rail_gui.cpp | 4 ++-- src/road_gui.cpp | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/lang/english.txt b/src/lang/english.txt index 2eacf4fb71..a17705cd2c 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -2691,7 +2691,9 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP :{BLACK}Build a STR_STATION_BUILD_STATION_CLASS_TOOLTIP :{BLACK}Select a station class to display STR_STATION_BUILD_STATION_TYPE_TOOLTIP :{BLACK}Select the station type to build -STR_STATION_CLASS_DFLT :Default station +STR_STATION_CLASS_DFLT :Default +STR_STATION_CLASS_DFLT_STATION :Default station +STR_STATION_CLASS_DFLT_ROADSTOP :Default road stop STR_STATION_CLASS_WAYP :Waypoints # Signal window diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index afe64d0955..07d915221c 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -1219,7 +1219,7 @@ public: StationClass *stclass = StationClass::Get(station_class); for (uint j = 0; j < stclass->GetSpecCount(); j++) { const StationSpec *statspec = stclass->GetSpec(j); - SetDParam(0, (statspec != nullptr && statspec->name != 0) ? statspec->name : STR_STATION_CLASS_DFLT); + SetDParam(0, (statspec != nullptr && statspec->name != 0) ? statspec->name : STR_STATION_CLASS_DFLT_STATION); d = maxdim(d, GetStringBoundingBox(str)); } } @@ -1323,7 +1323,7 @@ public: { if (widget == WID_BRAS_SHOW_NEWST_TYPE) { const StationSpec *statspec = StationClass::Get(_railstation.station_class)->GetSpec(_railstation.station_type); - SetDParam(0, (statspec != nullptr && statspec->name != 0) ? statspec->name : STR_STATION_CLASS_DFLT); + SetDParam(0, (statspec != nullptr && statspec->name != 0) ? statspec->name : STR_STATION_CLASS_DFLT_STATION); } } diff --git a/src/road_gui.cpp b/src/road_gui.cpp index a6147f7451..80f2416bde 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -1375,7 +1375,7 @@ public: RoadStopClass *rs_class = RoadStopClass::Get(roadstop_class); for (uint j = 0; j < rs_class->GetSpecCount(); j++) { const RoadStopSpec *roadstopspec = rs_class->GetSpec(j); - SetDParam(0, (roadstopspec != nullptr && roadstopspec->name != 0) ? roadstopspec->name : STR_STATION_CLASS_DFLT); + SetDParam(0, (roadstopspec != nullptr && roadstopspec->name != 0) ? roadstopspec->name : STR_STATION_CLASS_DFLT_ROADSTOP); d = maxdim(d, GetStringBoundingBox(str)); } } @@ -1497,7 +1497,7 @@ public: void SetStringParameters(int widget) const override { if (widget == WID_BROS_SHOW_NEWST_TYPE) { const RoadStopSpec *roadstopspec = RoadStopClass::Get(_roadstop_gui_settings.roadstop_class)->GetSpec(_roadstop_gui_settings.roadstop_type); - SetDParam(0, (roadstopspec != nullptr && roadstopspec->name != 0) ? roadstopspec->name : STR_STATION_CLASS_DFLT); + SetDParam(0, (roadstopspec != nullptr && roadstopspec->name != 0) ? roadstopspec->name : STR_STATION_CLASS_DFLT_ROADSTOP); } }