options menu scroll fixes, minor localization touchups

This commit is contained in:
DeaTh-G 2025-02-20 06:19:41 +01:00
parent e40e66f133
commit 686f3bbee0
2 changed files with 11 additions and 13 deletions

View file

@ -242,8 +242,8 @@ CONFIG_DEFINE_ENUM_LOCALE(EControllerIcons)
ELanguage::Japanese, ELanguage::Japanese,
{ {
{ EControllerIcons::Auto, { "自動検出", "[自動検出:じどうけんしゅつ]: ゲーム[内:ない]の\u200Bコントローライコンを\u200B[自動検出:じどうけんしゅつ]されます" } }, { EControllerIcons::Auto, { "自動検出", "[自動検出:じどうけんしゅつ]: ゲーム[内:ない]の\u200Bコントローライコンを\u200B[自動検出:じどうけんしゅつ]されます" } },
{ EControllerIcons::Xbox, { "XBOX", "Xbox: " } }, { EControllerIcons::Xbox, { "XBOX", "" } },
{ EControllerIcons::PlayStation, { "PLAYSTATION", "Xbox: " } } { EControllerIcons::PlayStation, { "PLAYSTATION", "" } }
} }
}, },
{ {
@ -418,7 +418,7 @@ CONFIG_DEFINE_LOCALE(MusicAttenuation)
CONFIG_DEFINE_LOCALE(ChannelConfiguration) CONFIG_DEFINE_LOCALE(ChannelConfiguration)
{ {
{ ELanguage::English, { "Channel Configuration", "Change the output mode for your audio device." } }, { ELanguage::English, { "Channel Configuration", "Change the output mode for your audio device." } },
{ ELanguage::Japanese, { "チャンネル[設定:せってい]", "オーディオデバイスの\u200B[出力:しゅつりょく]モード\u200Bを[変更:へんこう]できます" } }, { ELanguage::Japanese, { "チャンネル[設定:せってい]", "オーディオデバイスの\n[ 出 力 :しゅつりょく]モード\u200Bを[変更:へんこう]できます" } },
{ ELanguage::German, { "Kanalkonfiguration", "Ändere den Ausgabemodus für dein Audioausgabegerät." } }, { ELanguage::German, { "Kanalkonfiguration", "Ändere den Ausgabemodus für dein Audioausgabegerät." } },
{ ELanguage::French, { "Configuration sortie audio", "Modifie le mode de sortie pour votre périphérique audio." } }, { ELanguage::French, { "Configuration sortie audio", "Modifie le mode de sortie pour votre périphérique audio." } },
{ ELanguage::Spanish, { "Configuración de canales", "Cambia el modo de salida para tu dispositivo de audio." } }, { ELanguage::Spanish, { "Configuración de canales", "Cambia el modo de salida para tu dispositivo de audio." } },

View file

@ -1497,6 +1497,7 @@ static void DrawInfoPanel(ImVec2 infoMin, ImVec2 infoMax)
auto textX = clipRectMin.x - Scale(0.5f); auto textX = clipRectMin.x - Scale(0.5f);
auto textY = thumbnailMax.y + offsetY; auto textY = thumbnailMax.y + offsetY;
float lineWidth = clipRectMax.x - clipRectMin.x;
if (Config::Language == ELanguage::Japanese) if (Config::Language == ELanguage::Japanese)
{ {
@ -1511,9 +1512,13 @@ static void DrawInfoPanel(ImVec2 infoMin, ImVec2 infoMax)
clipRectMax.x += annotationFontSize; clipRectMax.x += annotationFontSize;
textY += annotationFontSize; textY += annotationFontSize;
// Dirty hack to disallow clipping on Japanese text
// whilst allowing annotations to go over the border
lineWidth -= annotationFontSize;
} }
auto textSize = MeasureCentredParagraph(g_seuratFont, fontSize, clipRectMax.x - clipRectMin.x, 5.0f, desc.c_str()); auto textSize = MeasureCentredParagraph(g_seuratFont, fontSize, lineWidth, 5.0f, desc.c_str());
drawList->PushClipRect(clipRectMin, clipRectMax, false); drawList->PushClipRect(clipRectMin, clipRectMax, false);
@ -1585,18 +1590,11 @@ static void DrawInfoPanel(ImVec2 infoMin, ImVec2 infoMax)
SetVerticalMarqueeFade({ clipRectMin.x, clipRectMin.y + Scale(5.5f) }, clipRectMax, Scale(10), Scale(10)); SetVerticalMarqueeFade({ clipRectMin.x, clipRectMin.y + Scale(5.5f) }, clipRectMax, Scale(10), Scale(10));
// Dirty hack to disallow clipping on Japanese text
// whilst allowing annotations to go over the border
if (Config::Language == ELanguage::Japanese)
{
clipRectMax.x -= annotationFontSize;
}
DrawRubyAnnotatedText DrawRubyAnnotatedText
( (
g_seuratFont, g_seuratFont,
fontSize, fontSize,
clipRectMax.x - clipRectMin.x, lineWidth,
{ textX, textY - scrollOffset }, { textX, textY - scrollOffset },
5.0f, 5.0f,
desc.c_str(), desc.c_str(),