Update to 12.0-beta1
This commit is contained in:
@@ -204,9 +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_SPECTATE = -3; ///< Become spectator
|
||||
static const int CTMN_SPECTATOR = -4; ///< 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.
|
||||
@@ -224,12 +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()));
|
||||
} else {
|
||||
list.emplace_back(new DropDownListStringItem(STR_NETWORK_COMPANY_LIST_SPECTATE, CTMN_SPECTATE, NetworkMaxSpectatorsReached()));
|
||||
}
|
||||
break;
|
||||
|
||||
case WID_TN_STORY:
|
||||
@@ -611,23 +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;
|
||||
|
||||
case CTMN_SPECTATE:
|
||||
if (_network_server) {
|
||||
NetworkServerDoMove(CLIENT_ID_SERVER, COMPANY_SPECTATOR);
|
||||
MarkWholeScreenDirty();
|
||||
} else {
|
||||
NetworkClientRequestMove(COMPANY_SPECTATOR);
|
||||
}
|
||||
return CBF_NONE;
|
||||
}
|
||||
}
|
||||
ShowCompany((CompanyID)index);
|
||||
@@ -2259,7 +2234,9 @@ static NWidgetBase *MakeMainToolbar(int *biggest_index)
|
||||
hor->Add(new NWidgetSpacer(0, 0));
|
||||
break;
|
||||
}
|
||||
hor->Add(new NWidgetLeaf(i == WID_TN_SAVE ? WWT_IMGBTN_2 : WWT_IMGBTN, COLOUR_GREY, i, toolbar_button_sprites[i], STR_TOOLBAR_TOOLTIP_PAUSE_GAME + i));
|
||||
NWidgetLeaf *leaf = new NWidgetLeaf(i == WID_TN_SAVE ? WWT_IMGBTN_2 : WWT_IMGBTN, COLOUR_GREY, i, toolbar_button_sprites[i], STR_TOOLBAR_TOOLTIP_PAUSE_GAME + i);
|
||||
leaf->SetMinimalSize(20, 20);
|
||||
hor->Add(leaf);
|
||||
}
|
||||
|
||||
*biggest_index = std::max<int>(*biggest_index, WID_TN_SWITCH_BAR);
|
||||
|
||||
Reference in New Issue
Block a user