From fc7418d19d831e7ebc0e7c5b5651d58e76158fe0 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sun, 24 Jun 2007 22:42:11 +0000 Subject: (svn r10314) -Codechange: Refer to vehicle names by index --- src/ship_gui.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/ship_gui.cpp') diff --git a/src/ship_gui.cpp b/src/ship_gui.cpp index 53eee6784..68e2acb17 100644 --- a/src/ship_gui.cpp +++ b/src/ship_gui.cpp @@ -38,8 +38,7 @@ static void ShipDetailsWndProc(Window *w, WindowEvent *e) SetWindowWidgetDisabledState(w, 5, !_patches.servint_ships); SetWindowWidgetDisabledState(w, 6, !_patches.servint_ships); - SetDParam(0, v->string_id); - SetDParam(1, v->unitnumber); + SetDParam(0, v->index); DrawWindowWidgets(w); /* Draw running cost */ @@ -113,8 +112,8 @@ static void ShipDetailsWndProc(Window *w, WindowEvent *e) switch (e->we.click.widget) { case 2: /* rename */ v = GetVehicle(w->window_number); - SetDParam(0, v->unitnumber); - ShowQueryString(v->string_id, STR_9831_NAME_SHIP, 31, 150, w, CS_ALPHANUMERAL); + SetDParam(0, v->index); + ShowQueryString(STR_VEHICLE_NAME, STR_9831_NAME_SHIP, 31, 150, w, CS_ALPHANUMERAL); break; case 5: /* increase int */ mod = _ctrl_pressed? 5 : 10; @@ -208,8 +207,7 @@ static void ShipViewWndProc(Window *w, WindowEvent *e) SetWindowWidgetDisabledState(w, 11, !is_localplayer); /* draw widgets & caption */ - SetDParam(0, v->string_id); - SetDParam(1, v->unitnumber); + SetDParam(0, v->index); DrawWindowWidgets(w); if (v->breakdown_ctr == 1) { -- cgit v1.2.3-54-g00ecf