| 105 | } |
| 106 | |
| 107 | void DrawWidget(const Rect &r, WidgetID widget) const override |
| 108 | { |
| 109 | if (widget != WID_EP_QUESTION) return; |
| 110 | |
| 111 | EngineID engine = static_cast<EngineID>(this->window_number); |
| 112 | int y = DrawStringMultiLine(r, GetString(STR_ENGINE_PREVIEW_MESSAGE, GetEngineCategoryName(engine)), TC_FROMSTRING, SA_HOR_CENTER | SA_TOP) + WidgetDimensions::scaled.vsep_wide; |
| 113 | |
| 114 | DrawString(r.left, r.right, y, GetString(STR_ENGINE_NAME, PackEngineNameDParam(engine, EngineNameContext::PreviewNews)), TC_BLACK, SA_HOR_CENTER); |
| 115 | y += GetCharacterHeight(FS_NORMAL); |
| 116 | |
| 117 | DrawVehicleEngine(r.left, r.right, this->width >> 1, y + this->vehicle_space / 2, engine, GetEnginePalette(engine, _local_company), EIT_PREVIEW); |
| 118 | |
| 119 | y += this->vehicle_space; |
| 120 | DrawStringMultiLine(r.left, r.right, y, r.bottom, GetEngineInfoString(engine), TC_BLACK, SA_CENTER); |
| 121 | } |
| 122 | |
| 123 | void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override |
| 124 | { |
nothing calls this directly
no test coverage detected