diff options
author | rubidium <rubidium@openttd.org> | 2011-12-16 16:58:55 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-12-16 16:58:55 +0000 |
commit | 4de1f3be885730cfa7dad6c6b3a4608f8808ce37 (patch) | |
tree | 62f55b8ed6b4d1fa65f5a4cb7c868ad97f5ffe62 /src/aircraft_cmd.cpp | |
parent | b8640b986f2a7188b7a21d4093a211b21a926c3e (diff) | |
download | openttd-4de1f3be885730cfa7dad6c6b3a4608f8808ce37.tar.xz |
(svn r23540) -Codechange: unify and document vehicle widgets
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r-- | src/aircraft_cmd.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index d03363650..f4a7fb6ab 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -381,10 +381,10 @@ static void CheckIfAircraftNeedsService(Aircraft *v) /* only goto depot if the target airport has a depot */ if (st->airport.HasHangar() && CanVehicleUseStation(v, st)) { v->current_order.MakeGoToDepot(st->index, ODTFB_SERVICE); - SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); + SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP); } else if (v->current_order.IsType(OT_GOTO_DEPOT)) { v->current_order.MakeDummy(); - SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); + SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP); } } @@ -618,7 +618,7 @@ static int UpdateAircraftSpeed(Aircraft *v, uint speed_limit = SPEED_LIMIT_NONE, /* updates statusbar only if speed have changed to save CPU time */ if (spd != v->cur_speed) { v->cur_speed = spd; - SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); + SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP); } /* Adjust distance moved by plane speed setting */ @@ -1854,7 +1854,7 @@ static void AircraftHandleDestTooFar(Aircraft *v, bool too_far) if (too_far) { if (!HasBit(v->flags, VAF_DEST_TOO_FAR)) { SetBit(v->flags, VAF_DEST_TOO_FAR); - SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); + SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP); AI::NewEvent(v->owner, new ScriptEventAircraftDestTooFar(v->index)); if (v->owner == _local_company) { /* Post a news message. */ @@ -1868,7 +1868,7 @@ static void AircraftHandleDestTooFar(Aircraft *v, bool too_far) if (HasBit(v->flags, VAF_DEST_TOO_FAR)) { /* Not too far anymore, clear flag and message. */ ClrBit(v->flags, VAF_DEST_TOO_FAR); - SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH); + SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, WID_VV_START_STOP); DeleteVehicleNews(v->index, STR_NEWS_AIRCRAFT_DEST_TOO_FAR); } } |