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

Function ToolbarGraphsClick

src/toolbar_gui.cpp:679–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

677}
678
679static CallBackFunction ToolbarGraphsClick(Window *w)
680{
681 DropDownList list;
682
683 list.push_back(MakeDropDownListStringItem(STR_GRAPH_MENU_OPERATING_PROFIT_GRAPH, GRMN_OPERATING_PROFIT_GRAPH));
684 list.push_back(MakeDropDownListStringItem(STR_GRAPH_MENU_INCOME_GRAPH, GRMN_INCOME_GRAPH));
685 list.push_back(MakeDropDownListStringItem(STR_GRAPH_MENU_DELIVERED_CARGO_GRAPH, GRMN_DELIVERED_CARGO_GRAPH));
686 list.push_back(MakeDropDownListStringItem(STR_GRAPH_MENU_PERFORMANCE_HISTORY_GRAPH, GRMN_PERFORMANCE_HISTORY_GRAPH));
687 list.push_back(MakeDropDownListStringItem(STR_GRAPH_MENU_COMPANY_VALUE_GRAPH, GRMN_COMPANY_VALUE_GRAPH));
688 list.push_back(MakeDropDownListStringItem(STR_GRAPH_MENU_CARGO_PAYMENT_RATES, GRMN_CARGO_PAYMENT_RATES));
689
690 if (_toolbar_mode != TB_NORMAL) AddDropDownLeagueTableOptions(list);
691
692 ShowDropDownList(w, std::move(list), GRMN_OPERATING_PROFIT_GRAPH, WID_TN_GRAPHS, 140, GetToolbarDropDownOptions());
693 return CBF_NONE;
694}
695
696static CallBackFunction ToolbarLeagueClick(Window *w)
697{

Callers

nothing calls this directly

Calls 5

ShowDropDownListFunction · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected