1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-22 03:42:41 +01:00

(svn r24420) [1.2] -Backport from trunk:

- Fix: Make the AI settings window behave more like the other settings window by closing the query window whenever selecting a different row (r24315)
- Fix: Editing NewGRF parameters using the query window showed wrong values, if there was no direct relation between parameter index and parameter register (r24314)
- Fix: Center object previews in 1- and 2-view selectors based on the 4-view selector layout [FS#5057] (r24299)
- Fix: Increase the left and right margins of the text in the yes/no query window (r24293)
This commit is contained in:
rubidium
2012-07-20 19:31:09 +00:00
parent caa1a6fdeb
commit 1971a5a2fe
4 changed files with 25 additions and 12 deletions

View File

@@ -326,9 +326,9 @@ struct NewGRFParametersWindow : public Window {
if (par_info == NULL) par_info = GetDummyParameterInfo(num);
/* One of the arrows is clicked */
uint32 old_val = par_info->GetValue(this->grf_config);
if (IsInsideMM(x, 0, 21)) {
uint32 val = par_info->GetValue(this->grf_config);
uint32 old_val = val;
uint32 val = old_val;
if (par_info->type == PTYPE_BOOL) {
val = !val;
} else {
@@ -350,7 +350,7 @@ struct NewGRFParametersWindow : public Window {
}
} else if (par_info->type == PTYPE_UINT_ENUM && click_count >= 2) {
/* Display a query box so users can enter a custom value. */
SetDParam(0, this->grf_config->param[num]);
SetDParam(0, old_val);
ShowQueryString(STR_JUST_INT, STR_CONFIG_SETTING_QUERY_CAPTION, 10, this, CS_NUMERAL, QSF_NONE);
}
this->SetDirty();