(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.
This commit is contained in:
@@ -162,7 +162,7 @@ static void RoadVehDetailsWndProc(Window *w, WindowEvent *e)
|
||||
case 2: /* rename */
|
||||
v = GetVehicle(w->window_number);
|
||||
SetDParam(0, v->unitnumber);
|
||||
ShowQueryString(v->string_id, STR_902C_NAME_ROAD_VEHICLE, 31, 150, w->window_class, w->window_number, CS_ALPHANUMERAL);
|
||||
ShowQueryString(v->string_id, STR_902C_NAME_ROAD_VEHICLE, 31, 150, w, CS_ALPHANUMERAL);
|
||||
break;
|
||||
|
||||
case 5: /* increase int */
|
||||
@@ -479,8 +479,7 @@ static void NewRoadVehWndProc(Window *w, WindowEvent *e)
|
||||
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_9036_RENAME_ROAD_VEHICLE_TYPE, 31, 160, w->window_class, w->window_number, CS_ALPHANUMERAL);
|
||||
ShowQueryString(GetCustomEngineName(sel_eng), STR_9036_RENAME_ROAD_VEHICLE_TYPE, 31, 160, w, CS_ALPHANUMERAL);
|
||||
}
|
||||
} break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user