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

Function ToolbarIndustryClick

src/toolbar_gui.cpp:738–747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

736/* --- Industries button menu --- */
737
738static CallBackFunction ToolbarIndustryClick(Window *w)
739{
740 /* Disable build-industry menu if we are a spectator */
741 if (_local_company == COMPANY_SPECTATOR) {
742 PopupMainToolbarMenu(w, WID_TN_INDUSTRIES, {STR_INDUSTRY_MENU_INDUSTRY_DIRECTORY, STR_INDUSTRY_MENU_INDUSTRY_CHAIN});
743 } else {
744 PopupMainToolbarMenu(w, WID_TN_INDUSTRIES, {STR_INDUSTRY_MENU_INDUSTRY_DIRECTORY, STR_INDUSTRY_MENU_INDUSTRY_CHAIN, STR_INDUSTRY_MENU_FUND_NEW_INDUSTRY});
745 }
746 return CBF_NONE;
747}
748
749/**
750 * Handle click on the entry in the Industry menu.

Callers

nothing calls this directly

Calls 1

PopupMainToolbarMenuFunction · 0.85

Tested by

no test coverage detected