1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 00:42:45 +01:00

Codechange: Pass raw string to editable query window. (#13481)

This avoids separating string id and parameters. EncodedString is not needed as it is the raw text that is editable.
This commit is contained in:
Peter Nelson
2025-02-07 17:03:53 +00:00
committed by GitHub
parent 8c48f9fc49
commit c3643e3ee0
25 changed files with 60 additions and 115 deletions

View File

@@ -495,8 +495,7 @@ struct ScriptSettingsWindow : public Window {
}
} else if (!bool_item && !config_item.complete_labels) {
/* Display a query box so users can enter a custom value. */
SetDParam(0, old_val);
ShowQueryString(STR_JUST_INT, STR_CONFIG_SETTING_QUERY_CAPTION, INT32_DIGITS_WITH_SIGN_AND_TERMINATION, this, CS_NUMERAL_SIGNED, QSF_NONE);
ShowQueryString(GetString(STR_JUST_INT, old_val), STR_CONFIG_SETTING_QUERY_CAPTION, INT32_DIGITS_WITH_SIGN_AND_TERMINATION, this, CS_NUMERAL_SIGNED, QSF_NONE);
}
this->SetDirty();
break;