| 415 | } |
| 416 | |
| 417 | void OnInit() override |
| 418 | { |
| 419 | /* Configure the road toolbar for the roadtype. */ |
| 420 | const RoadTypeInfo *rti = GetRoadTypeInfo(this->roadtype); |
| 421 | this->GetWidget<NWidgetCore>(WID_ROT_ROAD_X)->SetSprite(rti->gui_sprites.build_x_road); |
| 422 | this->GetWidget<NWidgetCore>(WID_ROT_ROAD_Y)->SetSprite(rti->gui_sprites.build_y_road); |
| 423 | this->GetWidget<NWidgetCore>(WID_ROT_AUTOROAD)->SetSprite(rti->gui_sprites.auto_road); |
| 424 | if (_game_mode != GM_EDITOR) { |
| 425 | this->GetWidget<NWidgetCore>(WID_ROT_DEPOT)->SetSprite(rti->gui_sprites.build_depot); |
| 426 | } |
| 427 | this->GetWidget<NWidgetCore>(WID_ROT_CONVERT_ROAD)->SetSprite(rti->gui_sprites.convert_road); |
| 428 | this->GetWidget<NWidgetCore>(WID_ROT_BUILD_TUNNEL)->SetSprite(rti->gui_sprites.build_tunnel); |
| 429 | } |
| 430 | |
| 431 | /** |
| 432 | * Switch to another road type. |
nothing calls this directly
no test coverage detected