diff options
author | Darkvater <darkvater@openttd.org> | 2006-12-30 01:17:53 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-12-30 01:17:53 +0000 |
commit | c87fcab77216fa2a3c8a5a334c32099665b1241d (patch) | |
tree | 4ef6719359384448b5674c8f954ba1a88987d16d /ship_gui.c | |
parent | ed2c8ecef5f2a6d62273ebccf0f82bad1f73ea4a (diff) | |
download | openttd-c87fcab77216fa2a3c8a5a334c32099665b1241d.tar.xz |
(svn r7637) -Codechange: Change ShowQueryString to use a window pointer as a parent. If the
query has no parent (eg give money, rename waypoint), the global function
HandleOnEditText is used.
Diffstat (limited to 'ship_gui.c')
-rw-r--r-- | ship_gui.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ship_gui.c b/ship_gui.c index c0719d803..010ea71e5 100644 --- a/ship_gui.c +++ b/ship_gui.c @@ -161,7 +161,7 @@ static void ShipDetailsWndProc(Window *w, WindowEvent *e) case 2: /* rename */ v = GetVehicle(w->window_number); SetDParam(0, v->unitnumber); - ShowQueryString(v->string_id, STR_9831_NAME_SHIP, 31, 150, w->window_class, w->window_number, CS_ALPHANUMERAL); + ShowQueryString(v->string_id, STR_9831_NAME_SHIP, 31, 150, w, CS_ALPHANUMERAL); break; case 5: /* increase int */ mod = _ctrl_pressed? 5 : 10; @@ -302,9 +302,8 @@ static void NewShipWndProc(Window *w, WindowEvent *e) case 6: { /* rename */ EngineID sel_eng = WP(w,buildvehicle_d).sel_engine; if (sel_eng != INVALID_ENGINE) { - WP(w,buildvehicle_d).rename_engine = sel_eng; - ShowQueryString(GetCustomEngineName(sel_eng), - STR_9838_RENAME_SHIP_TYPE, 31, 160, w->window_class, w->window_number, CS_ALPHANUMERAL); + WP(w, buildvehicle_d).rename_engine = sel_eng; + ShowQueryString(GetCustomEngineName(sel_eng), STR_9838_RENAME_SHIP_TYPE, 31, 160, w, CS_ALPHANUMERAL); } } break; } |