1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-20 10:52:41 +01:00

Codechange: Use EncodedString for Query window. (#13528)

This removes the need to separately capture and store global parameters.
This commit is contained in:
Peter Nelson
2025-02-11 17:30:16 +00:00
committed by GitHub
parent 08e451e6d9
commit 984da2455b
15 changed files with 67 additions and 55 deletions

View File

@@ -858,9 +858,9 @@ void MakeScreenshotWithConfirm(ScreenshotType t)
if (width * height > 8192 * 8192) {
/* Ask for confirmation */
_confirmed_screenshot_type = t;
SetDParam(0, width);
SetDParam(1, height);
ShowQuery(STR_WARNING_SCREENSHOT_SIZE_CAPTION, STR_WARNING_SCREENSHOT_SIZE_MESSAGE, nullptr, ScreenshotConfirmationCallback);
ShowQuery(
GetEncodedString(STR_WARNING_SCREENSHOT_SIZE_CAPTION),
GetEncodedString(STR_WARNING_SCREENSHOT_SIZE_MESSAGE, width, height), nullptr, ScreenshotConfirmationCallback);
} else {
/* Less than 64M pixels, just do it */
MakeScreenshot(t, {});