mirror of https://github.com/OpenTTD/OpenTTD
Change: Use lowered not disabled widget for current tab. (#10252)
While tab-buttons are not often used, all other similar occurences use lowered rather than disabled widgets, so use them for train detail window too.pull/10254/head
parent
7425660b3e
commit
1eecbd39ed
|
@ -2561,7 +2561,7 @@ struct VehicleDetailsWindow : Window {
|
||||||
const Vehicle *v = Vehicle::Get(this->window_number);
|
const Vehicle *v = Vehicle::Get(this->window_number);
|
||||||
|
|
||||||
if (v->type == VEH_TRAIN) {
|
if (v->type == VEH_TRAIN) {
|
||||||
this->DisableWidget(this->tab + WID_VD_DETAILS_CARGO_CARRIED);
|
this->LowerWidget(this->tab + WID_VD_DETAILS_CARGO_CARRIED);
|
||||||
this->vscroll->SetCount(GetTrainDetailsWndVScroll(v->index, this->tab));
|
this->vscroll->SetCount(GetTrainDetailsWndVScroll(v->index, this->tab));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2605,7 +2605,7 @@ struct VehicleDetailsWindow : Window {
|
||||||
case WID_VD_DETAILS_TRAIN_VEHICLES:
|
case WID_VD_DETAILS_TRAIN_VEHICLES:
|
||||||
case WID_VD_DETAILS_CAPACITY_OF_EACH:
|
case WID_VD_DETAILS_CAPACITY_OF_EACH:
|
||||||
case WID_VD_DETAILS_TOTAL_CARGO:
|
case WID_VD_DETAILS_TOTAL_CARGO:
|
||||||
this->SetWidgetsDisabledState(false,
|
this->SetWidgetsLoweredState(false,
|
||||||
WID_VD_DETAILS_CARGO_CARRIED,
|
WID_VD_DETAILS_CARGO_CARRIED,
|
||||||
WID_VD_DETAILS_TRAIN_VEHICLES,
|
WID_VD_DETAILS_TRAIN_VEHICLES,
|
||||||
WID_VD_DETAILS_CAPACITY_OF_EACH,
|
WID_VD_DETAILS_CAPACITY_OF_EACH,
|
||||||
|
|
Loading…
Reference in New Issue