From 160a0a5ee1b539c71c35e0f4fdc84841a1d3be70 Mon Sep 17 00:00:00 2001 From: darkvater Date: Tue, 21 Dec 2004 23:27:58 +0000 Subject: (svn r1211) -Feature: Introduce sticky windows to all vehicle windows...Just make sure you do not sticky more than 23 at a time. Also a lot of places in the code invalidated the 'status bar' of the vehicle, referring to it as widget 4. This is now widget 5 and has been #definitized --- aircraft_cmd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'aircraft_cmd.c') diff --git a/aircraft_cmd.c b/aircraft_cmd.c index d6af6737d..7d0c5eb6e 100644 --- a/aircraft_cmd.c +++ b/aircraft_cmd.c @@ -343,7 +343,7 @@ int32 CmdStartStopAircraft(int x, int y, uint32 flags, uint32 p1, uint32 p2) if (flags & DC_EXEC) { v->vehstatus ^= VS_STOPPED; - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); } @@ -366,7 +366,7 @@ int32 CmdSendAircraftToHangar(int x, int y, uint32 flags, uint32 p1, uint32 p2) if (v->current_order.flags & OF_UNLOAD) v->cur_order_index++; v->current_order.type = OT_DUMMY; v->current_order.flags = 0; - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); } } else { st = DEREF_STATION(v->u.air.targetairport); @@ -379,7 +379,7 @@ int32 CmdSendAircraftToHangar(int x, int y, uint32 flags, uint32 p1, uint32 p2) v->current_order.type = OT_GOTO_DEPOT; v->current_order.flags = OF_NON_STOP | OF_FULL_LOAD; v->current_order.station = v->u.air.targetairport; - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); } } @@ -481,11 +481,11 @@ static void CheckIfAircraftNeedsService(Vehicle *v) // v->u.air.targetairport = st->index; v->current_order.type = OT_GOTO_DEPOT; v->current_order.flags = OF_NON_STOP; - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); } else if (v->current_order.type == OT_GOTO_DEPOT) { v->current_order.type = OT_DUMMY; v->current_order.flags = 0; - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); } } @@ -674,7 +674,7 @@ static bool UpdateAircraftSpeed(Vehicle *v) if (spd != v->cur_speed) { v->cur_speed = spd; if (_patches.vehicle_speed) - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); } if (!(v->direction & 1)) { @@ -1148,7 +1148,7 @@ static void AircraftEntersTerminal(Vehicle *v) SET_EXPENSES_TYPE(EXPENSES_AIRCRAFT_INC); LoadUnloadVehicle(v); - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); } static void AircraftEnterHangar(Vehicle *v) -- cgit v1.2.3-54-g00ecf