Road stops: Shrink build window when changing to a shorter type

pull/507/head
Jonathan G Rennison 1 year ago
parent 6f42561859
commit ec73775f97

@ -1475,9 +1475,11 @@ public:
void UpdateBuildingHeight(uint height)
{
if (height > this->building_height) {
height = std::max<uint>(2, height);
if (height != this->building_height) {
int y_delta = (height - this->building_height) * ScaleGUITrad(8) * 2;
this->building_height = height;
this->ReInit();
this->ReInit(0, y_delta);
}
}
@ -1625,6 +1627,9 @@ public:
if (this->vscrollList != nullptr) {
this->vscrollList->SetCapacityFromWidget(this, WID_BROS_NEWST_LIST);
}
if (this->vscrollMatrix != nullptr) {
this->GetWidget<NWidgetMatrix>(WID_BROS_MATRIX)->SetClicked(_roadstop_gui_settings.roadstop_type);
}
}
void SetStringParameters(int widget) const override {

Loading…
Cancel
Save