summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-10 10:02:15 +0000
committerrubidium <rubidium@openttd.org>2008-04-10 10:02:15 +0000
commit00d5b516bfb25cfa24e53df59d9ce12302b2bff4 (patch)
tree0c7e57499945eb4864ab2bf710a767a06e553b33 /src
parente61dcab79d9dc3eba0b24094ee108606c970eac2 (diff)
downloadopenttd-00d5b516bfb25cfa24e53df59d9ce12302b2bff4.tar.xz
(svn r12649) -Fix: refit orders not being shown.
-Fix: unusable non-stop orders shown for waypoints and depots.
Diffstat (limited to 'src')
-rw-r--r--src/lang/english.txt4
-rw-r--r--src/order_gui.cpp15
2 files changed, 9 insertions, 10 deletions
diff --git a/src/lang/english.txt b/src/lang/english.txt
index 2fe65d27a..e6eabe2f7 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -2652,8 +2652,8 @@ STR_8800_TRAIN_DEPOT :{WHITE}{TOWN} T
STR_8801_CITIZENS_CELEBRATE_FIRST :{BLACK}{BIGFONT}Citizens celebrate . . .{}First train arrives at {STATION}!
STR_8802_DETAILS :{WHITE}{VEHICLE} (Details)
STR_8803_TRAIN_IN_THE_WAY :{WHITE}Train in the way
-STR_8804 :{SETX 10}{COMMA}: {STRING3}
-STR_8805 :{RIGHTARROW}{SETX 10}{COMMA}: {STRING3}
+STR_8804 :{SETX 10}{COMMA}: {STRING3} {STRING2}
+STR_8805 :{RIGHTARROW}{SETX 10}{COMMA}: {STRING3} {STRING2}
STR_ORDER_GO_TO :Go to
STR_ORDER_GO_NON_STOP_TO :Go non-stop to
STR_ORDER_GO_VIA :Go via
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 6b9fc3369..d82b8a902 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -186,7 +186,7 @@ static void DrawOrdersWindow(Window *w)
StringID str;
while (order != NULL) {
str = (v->cur_order_index == i) ? STR_8805 : STR_8804;
- SetDParam(3, STR_EMPTY);
+ SetDParam(5, STR_EMPTY);
if (i - w->vscroll.pos < w->vscroll.cap) {
SetDParam(1, 6);
@@ -228,10 +228,8 @@ static void DrawOrdersWindow(Window *w)
SetDParam(1, s);
if (order->IsRefit()) {
- SetDParam(3, STR_REFIT_ORDER);
- SetDParam(4, GetCargo(order->GetRefitCargo())->name);
- } else {
- SetDParam(3, STR_EMPTY);
+ SetDParam(5, STR_REFIT_ORDER);
+ SetDParam(6, GetCargo(order->GetRefitCargo())->name);
}
break;
}
@@ -656,9 +654,10 @@ static void OrdersWndProc(Window *w, WindowEvent *e)
OrderClick_Delete(w, v, 0);
break;
- case ORDER_WIDGET_NON_STOP:
- ShowDropDownMenu(w, _order_non_stop_drowdown, GetVehicleOrder(v, OrderGetSel(w))->GetNonStopType(), ORDER_WIDGET_NON_STOP, 0, 0, 124);
- break;
+ case ORDER_WIDGET_NON_STOP: {
+ const Order *o = GetVehicleOrder(v, OrderGetSel(w));
+ ShowDropDownMenu(w, _order_non_stop_drowdown, o->GetNonStopType(), ORDER_WIDGET_NON_STOP, 0, o->IsType(OT_GOTO_STATION) ? 0 : (o->IsType(OT_GOTO_WAYPOINT) ? 3 : 12), 124);
+ } break;
case ORDER_WIDGET_GOTO:
OrderClick_Goto(w, v, 0);