diff options
author | smatz <smatz@openttd.org> | 2008-01-18 13:02:47 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-01-18 13:02:47 +0000 |
commit | dfb91c26ec2504bba971e5f9dfe827ebe751567d (patch) | |
tree | 6f71f95cb20d1693e9d00ae92731d8f772f8f6ac /src/aircraft_cmd.cpp | |
parent | 04da1e1d456322d07e941ca19d35e9dc1020faf1 (diff) | |
download | openttd-dfb91c26ec2504bba971e5f9dfe827ebe751567d.tar.xz |
(svn r11916) -Codechange: use enums from VehicleViewWindowWidgets instead of constants
-Fix: refit button widget was not correctly updated
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r-- | src/aircraft_cmd.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 702661d65..2988791d1 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -537,7 +537,7 @@ CommandCost CmdStartStopAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 v->vehstatus ^= VS_STOPPED; v->cur_speed = 0; - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); InvalidateWindow(WC_VEHICLE_DEPOT, v->tile); InvalidateWindowClasses(WC_AIRCRAFT_LIST); } @@ -576,7 +576,7 @@ CommandCost CmdSendAircraftToHangar(TileIndex tile, uint32 flags, uint32 p1, uin if (flags & DC_EXEC) { ClrBit(v->current_order.flags, OF_PART_OF_ORDERS); ToggleBit(v->current_order.flags, OF_HALT_IN_DEPOT); - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); } return CommandCost(); } @@ -586,7 +586,7 @@ CommandCost CmdSendAircraftToHangar(TileIndex tile, uint32 flags, uint32 p1, uin if (v->current_order.flags & OFB_UNLOAD) v->cur_order_index++; v->current_order.type = OT_DUMMY; v->current_order.flags = 0; - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); } } else { bool next_airport_has_hangar = true; @@ -610,7 +610,7 @@ CommandCost CmdSendAircraftToHangar(TileIndex tile, uint32 flags, uint32 p1, uin if (!(p2 & DEPOT_SERVICE)) SetBit(v->current_order.flags, OF_HALT_IN_DEPOT); v->current_order.refit_cargo = CT_INVALID; v->current_order.dest = next_airport_index; - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); if (v->u.air.state == FLYING && !next_airport_has_hangar) { /* The aircraft is now heading for a different hangar than the next in the orders */ AircraftNextAirportPos_and_Order(v); @@ -715,11 +715,11 @@ static void CheckIfAircraftNeedsService(Vehicle *v) // v->u.air.targetairport = st->index; v->current_order.type = OT_GOTO_DEPOT; v->current_order.flags = OFB_NON_STOP; - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); } 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, STATUS_BAR); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); } } @@ -941,7 +941,7 @@ static int UpdateAircraftSpeed(Vehicle *v, uint speed_limit = SPEED_LIMIT_NONE, if (spd != v->cur_speed) { v->cur_speed = spd; if (_patches.vehicle_speed) - InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); + InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); } if (!(v->direction & 1)) spd = spd * 3 / 4; |