add more japanese specific hacks for installer_wizard description

This commit is contained in:
DeaTh-G 2025-02-18 18:08:22 +01:00
parent 85eac93a3b
commit c9c88372db

View file

@ -735,9 +735,19 @@ static void DrawDescriptionContainer()
snprintf(descriptionText, sizeof(descriptionText), "%s%s\n%s", GetWizardText(g_currentPage).c_str(), requiredSpaceText, availableSpaceText); snprintf(descriptionText, sizeof(descriptionText), "%s%s\n%s", GetWizardText(g_currentPage).c_str(), requiredSpaceText, availableSpaceText);
} }
else if (g_currentPage == WizardPage::InstallFailed) else if (g_currentPage == WizardPage::InstallFailed)
{
// 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); strncat(descriptionText, g_installerErrorMessage.c_str(), sizeof(descriptionText) - 1);
} }
}
double textAlpha = ComputeMotionInstaller(g_appearTime, g_disappearTime, CONTAINER_INNER_TIME, CONTAINER_INNER_DURATION); double textAlpha = ComputeMotionInstaller(g_appearTime, g_disappearTime, CONTAINER_INNER_TIME, CONTAINER_INNER_DURATION);
auto clipRectMin = drawList->GetClipRectMin(); auto clipRectMin = drawList->GetClipRectMin();
@ -769,6 +779,8 @@ static void DrawDescriptionContainer()
textX += annotationFontSize; textX += annotationFontSize;
textY += annotationFontSize; textY += annotationFontSize;
lineWidth += annotationFontSize;
} }
drawList->PushClipRect(clipRectMin, clipRectMax, false); drawList->PushClipRect(clipRectMin, clipRectMax, false);