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

Function MakeSaturationLegendLinkGraphGUI

src/linkgraph/linkgraph_gui.cpp:452–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

450}
451
452std::unique_ptr<NWidgetBase> MakeSaturationLegendLinkGraphGUI()
453{
454 auto panel = std::make_unique<NWidgetVertical>(NWidContainerFlag::EqualSize);
455 for (uint i = 0; i < lengthof(LinkGraphOverlay::LINK_COLOURS[0]); ++i) {
456 auto wid = std::make_unique<NWidgetBackground>(WWT_PANEL, COLOUR_DARK_GREEN, i + WID_LGL_SATURATION_FIRST);
457 wid->SetMinimalSize(50, 0);
458 wid->SetMinimalTextLines(1, 0, FS_SMALL);
459 wid->SetFill(1, 1);
460 wid->SetResize(0, 0);
461 panel->Add(std::move(wid));
462 }
463 return panel;
464}
465
466std::unique_ptr<NWidgetBase> MakeCargoesLegendLinkGraphGUI()
467{

Callers

nothing calls this directly

Calls 5

SetMinimalSizeMethod · 0.80
SetMinimalTextLinesMethod · 0.80
SetFillMethod · 0.80
SetResizeMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected