(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:
Darkvater
2006-12-30 01:17:53 +00:00
parent ed2c8ecef5
commit c87fcab772
18 changed files with 112 additions and 136 deletions

View File

@@ -845,7 +845,7 @@ static void PatchesSelectionWndProc(Window *w, WindowEvent *e)
WP(w,def_d).data_3 = btn;
SetDParam(0, value);
ShowQueryString(STR_CONFIG_PATCHES_INT32, STR_CONFIG_PATCHES_QUERY_CAPT, 10, 100, WC_GAME_OPTIONS, 0, CS_NUMERAL);
ShowQueryString(STR_CONFIG_PATCHES_INT32, STR_CONFIG_PATCHES_QUERY_CAPT, 10, 100, w, CS_NUMERAL);
}
}
@@ -1061,14 +1061,8 @@ static void CustCurrencyWndProc(Window *w, WindowEvent *e)
}
if (len != 0) {
WP(w,def_d).data_2 = line;
ShowQueryString(
str,
STR_CURRENCY_CHANGE_PARAMETER,
len + 1, // maximum number of characters OR
250, // characters up to this width pixels, whichever is satisfied first
w->window_class,
w->window_number, afilter);
WP(w, def_d).data_2 = line;
ShowQueryString(str, STR_CURRENCY_CHANGE_PARAMETER, len + 1, 250, w, afilter);
}
w->flags4 |= 5 << WF_TIMEOUT_SHL;