| 1330 | |
| 1331 | public: |
| 1332 | BuildRoadStationWindow(WindowDesc &desc, Window *parent, RoadStopType rs) : PickerWindow(desc, parent, TRANSPORT_ROAD, GetRoadStopPickerCallbacks(rs)) |
| 1333 | { |
| 1334 | this->coverage_height = 2 * GetCharacterHeight(FS_NORMAL) + WidgetDimensions::scaled.vsep_normal; |
| 1335 | |
| 1336 | /* Trams don't have non-drivethrough stations */ |
| 1337 | if (RoadTypeIsTram(_cur_roadtype) && _roadstop_gui.orientation < DIAGDIR_END) { |
| 1338 | _roadstop_gui.orientation = DIAGDIR_END; |
| 1339 | } |
| 1340 | this->ConstructWindow(); |
| 1341 | |
| 1342 | const RoadTypeInfo *rti = GetRoadTypeInfo(_cur_roadtype); |
| 1343 | this->GetWidget<NWidgetCore>(WID_BROS_CAPTION)->SetString(rti->strings.picker_title[to_underlying(rs)]); |
| 1344 | |
| 1345 | for (WidgetID i = RoadTypeIsTram(_cur_roadtype) ? WID_BROS_STATION_X : WID_BROS_STATION_NE; i < WID_BROS_LT_OFF; i++) { |
| 1346 | this->GetWidget<NWidgetCore>(i)->SetToolTip(rti->strings.picker_tooltip[to_underlying(rs)]); |
| 1347 | } |
| 1348 | |
| 1349 | this->LowerWidget(WID_BROS_STATION_NE + _roadstop_gui.orientation); |
| 1350 | this->LowerWidget(WID_BROS_LT_OFF + _settings_client.gui.station_show_coverage); |
| 1351 | |
| 1352 | this->window_class = (rs == RoadStopType::Bus) ? WC_BUS_STATION : WC_TRUCK_STATION; |
| 1353 | } |
| 1354 | |
| 1355 | void Close([[maybe_unused]] int data = 0) override |
| 1356 | { |
nothing calls this directly
no test coverage detected