| 487 | } |
| 488 | |
| 489 | bool OnTooltip([[maybe_unused]] Point pt, WidgetID widget, TooltipCloseCondition close_cond) override |
| 490 | { |
| 491 | bool can_build = CanBuildVehicleInfrastructure(VEH_TRAIN); |
| 492 | if (can_build) return false; |
| 493 | |
| 494 | if (std::ranges::find(can_build_widgets, widget) == std::end(can_build_widgets)) return false; |
| 495 | |
| 496 | GuiShowTooltips(this, GetEncodedString(STR_TOOLBAR_DISABLED_NO_VEHICLE_AVAILABLE), close_cond); |
| 497 | return true; |
| 498 | } |
| 499 | |
| 500 | void OnInit() override |
| 501 | { |
nothing calls this directly
no test coverage detected