diff options
author | peter1138 <peter1138@openttd.org> | 2007-06-24 22:42:11 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-06-24 22:42:11 +0000 |
commit | fc7418d19d831e7ebc0e7c5b5651d58e76158fe0 (patch) | |
tree | d9368d95af8a7f09cc32a4f7eb328fb63e863059 /src/train_gui.cpp | |
parent | ce91598e3ce045fcc3aeed3a3f07821d96605e9f (diff) | |
download | openttd-fc7418d19d831e7ebc0e7c5b5651d58e76158fe0.tar.xz |
(svn r10314) -Codechange: Refer to vehicle names by index
Diffstat (limited to 'src/train_gui.cpp')
-rw-r--r-- | src/train_gui.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/train_gui.cpp b/src/train_gui.cpp index 095e51739..78b48bbe0 100644 --- a/src/train_gui.cpp +++ b/src/train_gui.cpp @@ -169,8 +169,7 @@ static void TrainViewWndProc(Window *w, WindowEvent *e) } /* draw widgets & caption */ - SetDParam(0, v->string_id); - SetDParam(1, v->unitnumber); + SetDParam(0, v->index); DrawWindowWidgets(w); if (v->u.rail.crash_anim_pos != 0) { @@ -412,8 +411,7 @@ static void DrawTrainDetailsWindow(Window *w) SetWindowWidgetDisabledState(w, 6, !_patches.servint_trains); SetWindowWidgetDisabledState(w, 7, !_patches.servint_trains); - SetDParam(0, v->string_id); - SetDParam(1, v->unitnumber); + SetDParam(0, v->index); DrawWindowWidgets(w); SetDParam(1, v->age / 366); @@ -520,8 +518,8 @@ static void TrainDetailsWndProc(Window *w, WindowEvent *e) switch (e->we.click.widget) { case 2: /* name train */ v = GetVehicle(w->window_number); - SetDParam(0, v->unitnumber); - ShowQueryString(v->string_id, STR_8865_NAME_TRAIN, 31, 150, w, CS_ALPHANUMERAL); + SetDParam(0, v->index); + ShowQueryString(STR_VEHICLE_NAME, STR_8865_NAME_TRAIN, 31, 150, w, CS_ALPHANUMERAL); break; case 6: /* inc serv interval */ mod = _ctrl_pressed? 5 : 10; |