From a924b2ff81844c8d43ad1eaa25dea9642815738c Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Fri, 23 Apr 2021 16:22:01 +0200 Subject: Add: move "New Company" inside the Online Players GUI --- src/toolbar_gui.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/toolbar_gui.cpp') diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 6a65382b4..fc8b18347 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -204,8 +204,7 @@ static void PopupMainToolbMenu(Window *w, int widget, StringID string, int count /** Enum for the Company Toolbar's network related buttons */ static const int CTMN_CLIENT_LIST = -1; ///< Show the client list -static const int CTMN_NEW_COMPANY = -2; ///< Create a new company -static const int CTMN_SPECTATOR = -3; ///< Show a company window as spectator +static const int CTMN_SPECTATOR = -2; ///< Show a company window as spectator /** * Pop up a generic company list menu. @@ -223,10 +222,6 @@ static void PopupMainCompanyToolbMenu(Window *w, int widget, int grey = 0) /* Add the client list button for the companies menu */ list.emplace_back(new DropDownListStringItem(STR_NETWORK_COMPANY_LIST_CLIENT_LIST, CTMN_CLIENT_LIST, false)); - - if (_local_company == COMPANY_SPECTATOR) { - list.emplace_back(new DropDownListStringItem(STR_NETWORK_COMPANY_LIST_NEW_COMPANY, CTMN_NEW_COMPANY, NetworkMaxCompaniesReached())); - } break; case WID_TN_STORY: @@ -608,14 +603,6 @@ static CallBackFunction MenuClickCompany(int index) case CTMN_CLIENT_LIST: ShowClientList(); return CBF_NONE; - - case CTMN_NEW_COMPANY: - if (_network_server) { - DoCommandP(0, CCA_NEW, _network_own_client_id, CMD_COMPANY_CTRL); - } else { - NetworkSendCommand(0, CCA_NEW, 0, CMD_COMPANY_CTRL, nullptr, nullptr, _local_company); - } - return CBF_NONE; } } ShowCompany((CompanyID)index); -- cgit v1.2.3-54-g00ecf