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

Function ToolbarForestClick

src/toolbar_gui.cpp:983–991  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

981/* --- Forest button menu --- */
982
983static CallBackFunction ToolbarForestClick(Window *w)
984{
985 DropDownList list;
986 list.push_back(MakeDropDownListIconItem(SPR_IMG_LANDSCAPING, PAL_NONE, STR_LANDSCAPING_MENU_LANDSCAPING, 0));
987 list.push_back(MakeDropDownListIconItem(SPR_IMG_PLANTTREES, PAL_NONE, STR_LANDSCAPING_MENU_PLANT_TREES, 1));
988 list.push_back(MakeDropDownListIconItem(SPR_IMG_SIGN, PAL_NONE, STR_LANDSCAPING_MENU_PLACE_SIGN, 2));
989 ShowDropDownList(w, std::move(list), 0, WID_TN_LANDSCAPE, 100, GetToolbarDropDownOptions());
990 return CBF_NONE;
991}
992
993/**
994 * Handle click on the entry in the landscaping menu.

Callers

nothing calls this directly

Calls 4

MakeDropDownListIconItemFunction · 0.85
ShowDropDownListFunction · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected