MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / OnResize

Method OnResize

src/intro_gui.cpp:279–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277 }
278
279 void OnResize() override
280 {
281 bool changed = false;
282
283 if (NWidgetResizeBase *wid = this->GetWidget<NWidgetResizeBase>(WID_SGI_BASESET); wid != nullptr && wid->current_x > 0) {
284 changed |= wid->UpdateMultilineWidgetSize(GetString(STR_INTRO_BASESET, _missing_extra_graphics), 3);
285 }
286
287 if (NWidgetResizeBase *wid = this->GetWidget<NWidgetResizeBase>(WID_SGI_TRANSLATION); wid != nullptr && wid->current_x > 0) {
288 changed |= wid->UpdateMultilineWidgetSize(GetString(STR_INTRO_TRANSLATION, _current_language->missing), 3);
289 }
290
291 if (changed) this->ReInit(0, 0, this->flags.Test(WindowFlag::Centred));
292 }
293
294 void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
295 {

Callers

nothing calls this directly

Calls 4

ReInitMethod · 0.80
TestMethod · 0.80
GetStringFunction · 0.70

Tested by

no test coverage detected