Changeset - r27301:3c1635346c39
[Not reviewed]
master
0 3 0
Peter Nelson - 13 months ago 2023-05-08 08:09:34
peter1138@openttd.org
Change: Use separate names for default stations/roadstops.
3 files changed with 7 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/lang/english.txt
Show inline comments
 
@@ -2691,7 +2691,9 @@ STR_STATION_BUILD_DRAG_DROP_TOOLTIP     
 
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
src/rail_gui.cpp
Show inline comments
 
@@ -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);
 
		}
 
	}
 

	
src/road_gui.cpp
Show inline comments
 
@@ -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);
 
		}
 
	}
 

	
0 comments (0 inline, 0 general)