|
@@ -1656,40 +1656,40 @@ struct CompanyWindow : Window
|
|
|
this->query_widget = CW_WIDGET_COMPANY_NAME;
|
|
|
SetDParam(0, this->window_number);
|
|
|
ShowQueryString(STR_COMPANY_NAME, STR_COMPANY_VIEW_COMPANY_NAME_QUERY_CAPTION, MAX_LENGTH_COMPANY_NAME_BYTES, MAX_LENGTH_COMPANY_NAME_PIXELS, this, CS_ALPHANUMERAL, QSF_ENABLE_DEFAULT);
|
|
|
break;
|
|
|
|
|
|
case CW_WIDGET_BUILD_VIEW_HQ: {
|
|
|
TileIndex tile = Company::Get((CompanyID)this->window_number)->location_of_HQ;
|
|
|
if (tile == INVALID_TILE) {
|
|
|
if ((byte)this->window_number != _local_company) return;
|
|
|
SetObjectToPlaceWnd(SPR_CURSOR_HQ, PAL_NONE, HT_RECT, this);
|
|
|
SetTileSelectSize(2, 2);
|
|
|
this->LowerWidget(CW_WIDGET_BUILD_VIEW_HQ);
|
|
|
this->InvalidateWidget(CW_WIDGET_BUILD_VIEW_HQ);
|
|
|
this->SetWidgetDirty(CW_WIDGET_BUILD_VIEW_HQ);
|
|
|
} else {
|
|
|
if (_ctrl_pressed) {
|
|
|
ShowExtraViewPortWindow(tile);
|
|
|
} else {
|
|
|
ScrollMainWindowToTile(tile);
|
|
|
}
|
|
|
}
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
case CW_WIDGET_RELOCATE_HQ:
|
|
|
SetObjectToPlaceWnd(SPR_CURSOR_HQ, PAL_NONE, HT_RECT, this);
|
|
|
SetTileSelectSize(2, 2);
|
|
|
this->LowerWidget(CW_WIDGET_RELOCATE_HQ);
|
|
|
this->InvalidateWidget(CW_WIDGET_RELOCATE_HQ);
|
|
|
this->SetWidgetDirty(CW_WIDGET_RELOCATE_HQ);
|
|
|
break;
|
|
|
|
|
|
case CW_WIDGET_BUY_SHARE:
|
|
|
DoCommandP(0, this->window_number, 0, CMD_BUY_SHARE_IN_COMPANY | CMD_MSG(STR_ERROR_CAN_T_BUY_25_SHARE_IN_THIS));
|
|
|
break;
|
|
|
|
|
|
case CW_WIDGET_SELL_SHARE:
|
|
|
DoCommandP(0, this->window_number, 0, CMD_SELL_SHARE_IN_COMPANY | CMD_MSG(STR_ERROR_CAN_T_SELL_25_SHARE_IN));
|
|
|
break;
|
|
|
|
|
|
#ifdef ENABLE_NETWORK
|
|
|
case CW_WIDGET_COMPANY_PASSWORD:
|