diff options
author | zuu <zuu@openttd.org> | 2013-06-09 15:36:31 +0000 |
---|---|---|
committer | zuu <zuu@openttd.org> | 2013-06-09 15:36:31 +0000 |
commit | be8645e13764d43a85f3f101897b74fa1545d359 (patch) | |
tree | 9a5f43f5a453bdfc950e7a4778a5f85a9560df95 /src/toolbar_gui.cpp | |
parent | 21d0f2e88394226bde98e1ce54e1052c1c31d8d5 (diff) | |
download | openttd-be8645e13764d43a85f3f101897b74fa1545d359.tar.xz |
(svn r25383) -Fix (r25376): Remove now redundant menu entries for story book and goals
Diffstat (limited to 'src/toolbar_gui.cpp')
-rw-r--r-- | src/toolbar_gui.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index d143f07ca..420079c53 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -178,15 +178,14 @@ static void PopupMainToolbMenu(Window *w, int widget, DropDownList *list, int de * @param widget Toolbar button * @param string String for the first item in the menu * @param count Number of items in the menu - * @param skip Hide first \a skip items in the menu */ -static void PopupMainToolbMenu(Window *w, int widget, StringID string, int count, int skip = 0) +static void PopupMainToolbMenu(Window *w, int widget, StringID string, int count) { DropDownList *list = new DropDownList(); - for (int i = skip; i < count; i++) { + for (int i = 0; i < count; i++) { list->push_back(new DropDownListStringItem(string + i, i, false)); } - PopupMainToolbMenu(w, widget, list, skip); + PopupMainToolbMenu(w, widget, list, 0); } /** Enum for the Company Toolbar's network related buttons */ @@ -682,7 +681,7 @@ static CallBackFunction MenuClickGraphs(int index) static CallBackFunction ToolbarLeagueClick(Window *w) { - PopupMainToolbMenu(w, WID_TN_LEAGUE, STR_GRAPH_MENU_GOAL, _networking ? 4 : 5, Game::GetInstance() != NULL ? 0 : 2); + PopupMainToolbMenu(w, WID_TN_LEAGUE, STR_GRAPH_MENU_COMPANY_LEAGUE_TABLE, _networking ? 2 : 3); return CBF_NONE; } @@ -695,11 +694,9 @@ static CallBackFunction ToolbarLeagueClick(Window *w) static CallBackFunction MenuClickLeague(int index) { switch (index) { - case 0: ShowGoalsList(_local_company); break; - case 1: ShowStoryBook(_local_company); break; - case 2: ShowCompanyLeagueTable(); break; - case 3: ShowPerformanceRatingDetail(); break; - case 4: ShowHighscoreTable(); break; + case 0: ShowCompanyLeagueTable(); break; + case 1: ShowPerformanceRatingDetail(); break; + case 2: ShowHighscoreTable(); break; } return CBF_NONE; } |