This commit is contained in:
@@ -1097,9 +1097,6 @@ struct BuildVehicleWindow : Window {
|
|||||||
* So we just hide it, and enlarge the Rename button by the now vacant place. */
|
* So we just hide it, and enlarge the Rename button by the now vacant place. */
|
||||||
if (this->listview_mode) this->GetWidget<NWidgetStacked>(WID_BV_BUILD_SEL)->SetDisplayedPlane(SZSP_NONE);
|
if (this->listview_mode) this->GetWidget<NWidgetStacked>(WID_BV_BUILD_SEL)->SetDisplayedPlane(SZSP_NONE);
|
||||||
|
|
||||||
/* disable renaming engines in network games if you are not the server */
|
|
||||||
this->SetWidgetDisabledState(WID_BV_RENAME, _networking && !_network_server);
|
|
||||||
|
|
||||||
NWidgetCore *widget = this->GetWidget<NWidgetCore>(WID_BV_LIST);
|
NWidgetCore *widget = this->GetWidget<NWidgetCore>(WID_BV_LIST);
|
||||||
widget->tool_tip = STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP + type;
|
widget->tool_tip = STR_BUY_VEHICLE_TRAIN_LIST_TOOLTIP + type;
|
||||||
|
|
||||||
@@ -1608,7 +1605,10 @@ struct BuildVehicleWindow : Window {
|
|||||||
this->GenerateBuildList();
|
this->GenerateBuildList();
|
||||||
this->vscroll->SetCount((uint)this->eng_list.size());
|
this->vscroll->SetCount((uint)this->eng_list.size());
|
||||||
|
|
||||||
this->SetWidgetsDisabledState(this->sel_engine == INVALID_ENGINE, WID_BV_SHOW_HIDE, WID_BV_BUILD, WID_BV_RENAME, WIDGET_LIST_END);
|
this->SetWidgetsDisabledState(this->sel_engine == INVALID_ENGINE, WID_BV_SHOW_HIDE, WID_BV_BUILD, WIDGET_LIST_END);
|
||||||
|
|
||||||
|
/* Disable renaming engines in network games if you are not the server. */
|
||||||
|
this->SetWidgetDisabledState(WID_BV_RENAME, this->sel_engine == INVALID_ENGINE || (_networking && !_network_server));
|
||||||
|
|
||||||
this->DrawWidgets();
|
this->DrawWidgets();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user