* Some data on this window has become invalid. * @param data Information about the changed data. * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details. */
| 611 | * @param gui_scope Whether the call is done from GUI scope. You may not do everything when not in GUI scope. See #InvalidateWindowData() for details. |
| 612 | */ |
| 613 | void OnInvalidateData([[maybe_unused]] int data = 0, [[maybe_unused]] bool gui_scope = true) override |
| 614 | { |
| 615 | if (!gui_scope) return; |
| 616 | if (this->HasChainIndex()) { |
| 617 | this->ValidateChainIndex(); |
| 618 | this->SetWidgetDisabledState(WID_NGRFI_VEH_PREV, this->chain_index == 0); |
| 619 | Vehicle *v = Vehicle::Get(this->GetFeatureIndex()); |
| 620 | this->SetWidgetDisabledState(WID_NGRFI_VEH_NEXT, v == nullptr || v->Next() == nullptr); |
| 621 | } |
| 622 | } |
| 623 | }; |
| 624 | |
| 625 | /* static */ uint32_t NewGRFInspectWindow::var60params[GSF_FAKE_END][0x20] = { {0} }; // Use spec to have 0s in whole array |
no test coverage detected