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

Method ResizeWindowAsNeeded

src/town_gui.cpp:561–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

559 }
560
561 void ResizeWindowAsNeeded()
562 {
563 const NWidgetBase *nwid_info = this->GetWidget<NWidgetBase>(WID_TV_INFO);
564 uint aimed_height = GetDesiredInfoHeight(nwid_info->current_x);
565 if (aimed_height > nwid_info->current_y || (aimed_height < nwid_info->current_y && nwid_info->current_y > nwid_info->smallest_y)) {
566 this->ReInit();
567 }
568 }
569
570 void OnResize() override
571 {

Callers 1

OnInvalidateDataMethod · 0.95

Calls 2

ReInitMethod · 0.80

Tested by

no test coverage detected