| 481 | } |
| 482 | |
| 483 | std::string GetWidgetString(WidgetID widget, StringID stringid) const override |
| 484 | { |
| 485 | switch (widget) { |
| 486 | case WID_DPI_FUND_WIDGET: |
| 487 | /* Raw industries might be prospected. Show this fact by changing the string |
| 488 | * In Editor, you just build, while ingame, or you fund or you prospect */ |
| 489 | if (_game_mode == GM_EDITOR) { |
| 490 | /* We've chosen many random industries but no industries have been specified */ |
| 491 | return GetString(STR_FUND_INDUSTRY_BUILD_NEW_INDUSTRY); |
| 492 | } |
| 493 | if (this->selected_type != IT_INVALID) { |
| 494 | const IndustrySpec *indsp = GetIndustrySpec(this->selected_type); |
| 495 | return GetString((_settings_game.construction.raw_industry_construction == 2 && indsp->IsRawIndustry()) ? STR_FUND_INDUSTRY_PROSPECT_NEW_INDUSTRY : STR_FUND_INDUSTRY_FUND_NEW_INDUSTRY); |
| 496 | } |
| 497 | return GetString(STR_FUND_INDUSTRY_FUND_NEW_INDUSTRY); |
| 498 | |
| 499 | default: |
| 500 | return this->Window::GetWidgetString(widget, stringid); |
| 501 | } |
| 502 | } |
| 503 | |
| 504 | void DrawWidget(const Rect &r, WidgetID widget) const override |
| 505 | { |
nothing calls this directly
no test coverage detected