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

Method ReplaceList

src/dropdown.cpp:358–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356 }
357
358 void ReplaceList(DropDownList &&list, std::optional<int> selected_result)
359 {
360 this->list = std::move(list);
361 if (selected_result.has_value()) this->selected_result = *selected_result;
362 this->UpdateSizeAndPosition();
363 this->ReInit(0, 0);
364 this->InitializePositionSize(this->position.x, this->position.y, this->nested_root->smallest_x, this->nested_root->smallest_y);
365 this->FindWindowPlacementAndResize(this->window_desc.GetDefaultWidth(), this->window_desc.GetDefaultHeight(), true);
366 this->SetDirty();
367 }
368};
369
370void ReplaceDropDownList(Window *parent, DropDownList &&list, std::optional<int> selected_result)

Callers 1

ReplaceDropDownListFunction · 0.80

Calls 7

UpdateSizeAndPositionMethod · 0.95
ReInitMethod · 0.80
GetDefaultWidthMethod · 0.80
GetDefaultHeightMethod · 0.80
SetDirtyMethod · 0.45

Tested by

no test coverage detected