src/station_gui.cpp
changeset 6598 06b4750ad778
parent 6597 e4ce4b1aa3bf
child 6611 b7c7829c8fc7
equal deleted inserted replaced
6597:e4ce4b1aa3bf 6598:06b4750ad778
   267 
   267 
   268 	sl->resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;
   268 	sl->resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;
   269 	sl->flags &= ~SL_RESORT;
   269 	sl->flags &= ~SL_RESORT;
   270 }
   270 }
   271 
   271 
   272 static uint32 _cargo_filter = UINT32_MAX;
   272 static uint32 _cargo_filter = std::numeric_limits<uint32>::max();
   273 
   273 
   274 static void PlayerStationsWndProc(Window *w, WindowEvent *e)
   274 static void PlayerStationsWndProc(Window *w, WindowEvent *e)
   275 {
   275 {
   276 	const PlayerID owner = (PlayerID)w->window_number;
   276 	const PlayerID owner = (PlayerID)w->window_number;
   277 	static byte facilities = FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK;
   277 	static byte facilities = FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK;
   280 
   280 
   281 	plstations_d *sl = &WP(w, plstations_d);
   281 	plstations_d *sl = &WP(w, plstations_d);
   282 
   282 
   283 	switch (e->event) {
   283 	switch (e->event) {
   284 		case WE_CREATE: /* set up resort timer */
   284 		case WE_CREATE: /* set up resort timer */
   285 			if (_cargo_filter == UINT32_MAX) _cargo_filter = _cargo_mask;
   285 			if (_cargo_filter == std::numeric_limits<uint32>::max()) _cargo_filter = _cargo_mask;
   286 
   286 
   287 			for (uint i = 0; i < 5; i++) {
   287 			for (uint i = 0; i < 5; i++) {
   288 				if (HASBIT(facilities, i)) LowerWindowWidget(w, i + STATIONLIST_WIDGET_TRAIN);
   288 				if (HASBIT(facilities, i)) LowerWindowWidget(w, i + STATIONLIST_WIDGET_TRAIN);
   289 			}
   289 			}
   290 			SetWindowWidgetLoweredState(w, STATIONLIST_WIDGET_FACILALL, facilities == (FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK));
   290 			SetWindowWidgetLoweredState(w, STATIONLIST_WIDGET_FACILALL, facilities == (FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK));