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

Function MakePickerClassWidgets

src/picker_gui.cpp:745–765  ·  view source on GitHub ↗

Create nested widgets for the class picker widgets. */

Source from the content-addressed store, hash-verified

743
744/** Create nested widgets for the class picker widgets. */
745std::unique_ptr<NWidgetBase> MakePickerClassWidgets()
746{
747 static constexpr std::initializer_list<NWidgetPart> picker_class_widgets = {
748 NWidget(NWID_SELECTION, INVALID_COLOUR, WID_PW_CLASS_SEL),
749 NWidget(NWID_VERTICAL),
750 NWidget(WWT_PANEL, COLOUR_DARK_GREEN),
751 NWidget(WWT_EDITBOX, COLOUR_DARK_GREEN, WID_PW_CLASS_FILTER), SetMinimalSize(144, 0), SetPadding(2), SetFill(1, 0), SetStringTip(STR_LIST_FILTER_OSKTITLE, STR_LIST_FILTER_TOOLTIP),
752 EndContainer(),
753 NWidget(NWID_HORIZONTAL),
754 NWidget(WWT_PANEL, COLOUR_DARK_GREEN),
755 NWidget(WWT_MATRIX, COLOUR_GREY, WID_PW_CLASS_LIST), SetFill(1, 1), SetResize(1, 1), SetPadding(WidgetDimensions::unscaled.picker),
756 SetMatrixDataTip(1, 0), SetScrollbar(WID_PW_CLASS_SCROLL),
757 EndContainer(),
758 NWidget(NWID_VSCROLLBAR, COLOUR_DARK_GREEN, WID_PW_CLASS_SCROLL),
759 EndContainer(),
760 EndContainer(),
761 EndContainer(),
762 };
763
764 return MakeNWidgets(picker_class_widgets, nullptr);
765}
766
767/** Create nested widgets for the type picker widgets. */
768std::unique_ptr<NWidgetBase> MakePickerTypeWidgets()

Callers

nothing calls this directly

Calls 10

NWidgetFunction · 0.85
SetMinimalSizeFunction · 0.85
SetPaddingFunction · 0.85
SetFillFunction · 0.85
SetStringTipFunction · 0.85
EndContainerFunction · 0.85
SetResizeFunction · 0.85
SetMatrixDataTipFunction · 0.85
SetScrollbarFunction · 0.85
MakeNWidgetsFunction · 0.85

Tested by

no test coverage detected