--- a/src/order_gui.cpp Tue Jul 31 23:31:45 2007 +0000
+++ b/src/order_gui.cpp Fri Aug 03 18:10:15 2007 +0000
@@ -115,7 +115,6 @@
int sel;
int y, i;
bool shared_orders;
- byte color;
v = GetVehicle(w->window_number);
@@ -192,6 +191,11 @@
SetDParam(1, 6);
switch (order->type) {
+ case OT_DUMMY:
+ SetDParam(1, STR_INVALID_ORDER);
+ SetDParam(2, order->dest);
+ break;
+
case OT_GOTO_STATION:
SetDParam(1, StationOrderStrings[order->flags]);
SetDParam(2, order->dest);
@@ -234,15 +238,10 @@
default: break;
}
- color = (i == WP(w,order_d).sel) ? 0xC : 0x10;
+ const byte colour = (i == WP(w,order_d).sel) ? 0xC : 0x10;
SetDParam(0, i + 1);
- if (order->type != OT_DUMMY) {
- DrawString(2, y, str, color);
- } else {
- SetDParam(1, STR_INVALID_ORDER);
- SetDParam(2, order->dest);
- DrawString(2, y, str, color);
- }
+ DrawString(2, y, str, colour);
+
y += 10;
}
@@ -252,8 +251,8 @@
if (i - w->vscroll.pos < w->vscroll.cap) {
str = shared_orders ? STR_END_OF_SHARED_ORDERS : STR_882A_END_OF_ORDERS;
- color = (i == WP(w,order_d).sel) ? 0xC : 0x10;
- DrawString(2, y, str, color);
+ const byte colour = (i == WP(w,order_d).sel) ? 0xC : 0x10;
+ DrawString(2, y, str, colour);
}
}
@@ -279,7 +278,7 @@
}
break;
- case MP_STREET:
+ case MP_ROAD:
if (GetRoadTileType(tile) == ROAD_TILE_DEPOT && v->type == VEH_ROAD && IsTileOwner(tile, _local_player)) {
order.type = OT_GOTO_DEPOT;
order.flags = OF_PART_OF_ORDERS;
@@ -771,7 +770,7 @@
};
static const WindowDesc _orders_train_desc = {
- WDP_AUTO, WDP_AUTO, 399, 88,
+ WDP_AUTO, WDP_AUTO, 399, 88, 399, 88,
WC_VEHICLE_ORDERS,WC_VEHICLE_VIEW,
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE,
_orders_train_widgets,
@@ -808,7 +807,7 @@
};
static const WindowDesc _orders_desc = {
- WDP_AUTO, WDP_AUTO, 410, 88,
+ WDP_AUTO, WDP_AUTO, 410, 88, 410, 88,
WC_VEHICLE_ORDERS,WC_VEHICLE_VIEW,
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_RESIZABLE,
_orders_widgets,
@@ -845,7 +844,7 @@
};
static const WindowDesc _other_orders_desc = {
- WDP_AUTO, WDP_AUTO, 332, 88,
+ WDP_AUTO, WDP_AUTO, 332, 88, 332, 88,
WC_VEHICLE_ORDERS,WC_VEHICLE_VIEW,
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_UNCLICK_BUTTONS | WDF_RESIZABLE,
_other_orders_widgets,