summaryrefslogtreecommitdiff
path: root/src/ship_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-01-18 13:02:47 +0000
committersmatz <smatz@openttd.org>2008-01-18 13:02:47 +0000
commitdfb91c26ec2504bba971e5f9dfe827ebe751567d (patch)
tree6f71f95cb20d1693e9d00ae92731d8f772f8f6ac /src/ship_cmd.cpp
parent04da1e1d456322d07e941ca19d35e9dc1020faf1 (diff)
downloadopenttd-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/ship_cmd.cpp')
-rw-r--r--src/ship_cmd.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp
index cae413356..bddf94a94 100644
--- a/src/ship_cmd.cpp
+++ b/src/ship_cmd.cpp
@@ -158,7 +158,7 @@ static void CheckIfShipNeedsService(Vehicle *v)
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);
}
return;
}
@@ -167,7 +167,7 @@ static void CheckIfShipNeedsService(Vehicle *v)
v->current_order.flags = OFB_NON_STOP;
v->current_order.dest = depot->index;
v->dest_tile = depot->xy;
- InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
+ InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
}
void OnNewDay_Ship(Vehicle *v)
@@ -386,7 +386,7 @@ static bool ShipAccelerate(Vehicle *v)
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);
}
/* Decrease somewhat when turning */
@@ -683,7 +683,7 @@ static void ShipController(Vehicle *v)
* always skip ahead. */
if (v->current_order.type == OT_LEAVESTATION) {
v->current_order.Free();
- InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
+ InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
} else if (v->dest_tile != 0) {
/* We have a target, let's see if we reached it... */
if (v->current_order.type == OT_GOTO_STATION &&
@@ -961,7 +961,7 @@ CommandCost CmdStartStopShip(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
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_SHIPS_LIST);
}
@@ -1007,7 +1007,7 @@ CommandCost CmdSendShipToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p
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();
}
@@ -1021,7 +1021,7 @@ CommandCost CmdSendShipToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p
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);
}
return CommandCost();
}
@@ -1038,7 +1038,7 @@ CommandCost CmdSendShipToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p
if (!(p2 & DEPOT_SERVICE)) SetBit(v->current_order.flags, OF_HALT_IN_DEPOT);
v->current_order.refit_cargo = CT_INVALID;
v->current_order.dest = dep->index;
- InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
+ InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
}
return CommandCost();