Codechange: make WindowClass a scoped enum

This commit is contained in:
Rubidium
2026-05-20 21:39:04 +02:00
committed by rubidium42
parent a9a2965131
commit bcda4a72ee
134 changed files with 1361 additions and 1249 deletions
+3 -3
View File
@@ -852,7 +852,7 @@ static constexpr std::initializer_list<NWidgetPart> _nested_timetable_widgets =
/** Window definition for the timetable window. */
static WindowDesc _timetable_desc(
WindowPosition::Automatic, "view_vehicle_timetable", 400, 130,
WC_VEHICLE_TIMETABLE, WC_VEHICLE_VIEW,
WindowClass::VehicleTimetable, WindowClass::VehicleView,
WindowDefaultFlag::Construction,
_nested_timetable_widgets
);
@@ -863,7 +863,7 @@ static WindowDesc _timetable_desc(
*/
void ShowTimetableWindow(const Vehicle *v)
{
CloseWindowById(WC_VEHICLE_DETAILS, v->index, false);
CloseWindowById(WC_VEHICLE_ORDERS, v->index, false);
CloseWindowById(WindowClass::VehicleDetails, v->index, false);
CloseWindowById(WindowClass::VehicleOrders, v->index, false);
AllocateWindowDescFront<TimetableWindow>(_timetable_desc, v->index);
}