diff options
author | Patric Stout <truebrain@openttd.org> | 2021-04-23 16:22:01 +0200 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-04-24 21:43:58 +0200 |
commit | a924b2ff81844c8d43ad1eaa25dea9642815738c (patch) | |
tree | 9075d2bff870e33ec8c78286128d399739ced542 /src/toolbar_gui.cpp | |
parent | c2e116a3d3240daf6f1f27a0847efe10a0489adc (diff) | |
download | openttd-a924b2ff81844c8d43ad1eaa25dea9642815738c.tar.xz |
Add: move "New Company" inside the Online Players GUI
Diffstat (limited to 'src/toolbar_gui.cpp')
-rw-r--r-- | src/toolbar_gui.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
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); |