From c9c88372dbd762a12357dd455c46faa360da9d19 Mon Sep 17 00:00:00 2001 From: DeaTh-G Date: Tue, 18 Feb 2025 18:08:22 +0100 Subject: [PATCH] add more japanese specific hacks for installer_wizard description --- UnleashedRecomp/ui/installer_wizard.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/UnleashedRecomp/ui/installer_wizard.cpp b/UnleashedRecomp/ui/installer_wizard.cpp index d4af8afd..fe587921 100644 --- a/UnleashedRecomp/ui/installer_wizard.cpp +++ b/UnleashedRecomp/ui/installer_wizard.cpp @@ -736,7 +736,17 @@ static void DrawDescriptionContainer() } else if (g_currentPage == WizardPage::InstallFailed) { - strncat(descriptionText, g_installerErrorMessage.c_str(), sizeof(descriptionText) - 1); + // Japanese needs text to be brought in by a normal width space + // as it allows for text to begin further than others for + // special characters. + if (Config::Language == ELanguage::Japanese) + { + strncat(descriptionText, std::string(" " + g_installerErrorMessage).c_str(), sizeof(descriptionText) - 1); + } + else + { + strncat(descriptionText, g_installerErrorMessage.c_str(), sizeof(descriptionText) - 1); + } } double textAlpha = ComputeMotionInstaller(g_appearTime, g_disappearTime, CONTAINER_INNER_TIME, CONTAINER_INNER_DURATION); @@ -769,6 +779,8 @@ static void DrawDescriptionContainer() textX += annotationFontSize; textY += annotationFontSize; + + lineWidth += annotationFontSize; } drawList->PushClipRect(clipRectMin, clipRectMax, false);