From 5021b7d06281c8de43e00ab9419ec9ffffa3e28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=AF=E6=9C=88=E5=85=94?= <102902827+angel12538@users.noreply.github.com> Date: Mon, 19 Oct 2026 14:40:35 +0800 Subject: [PATCH] Fix tooltip translation through IMGUI hooks Render tooltips with GUI.Label and retain their GUIContent so IMGUI translators can update the text and subsequent repaints measure the translated height. --- ConfigurationManager.Shared/ConfigurationManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ConfigurationManager.Shared/ConfigurationManager.cs b/ConfigurationManager.Shared/ConfigurationManager.cs index db92e8a..cd78b64 100644 --- a/ConfigurationManager.Shared/ConfigurationManager.cs +++ b/ConfigurationManager.Shared/ConfigurationManager.cs @@ -363,7 +363,7 @@ private static void DrawTooltip(Rect area) style.wordWrap = true; style.alignment = TextAnchor.MiddleCenter; - GUIContent content = new GUIContent(tooltip); + GUIContent content = ImguiUtils.Content(tooltip); const int width = 400; var height = style.CalcHeight(content, 400) + 10; @@ -380,7 +380,7 @@ private static void DrawTooltip(Rect area) Rect position = new Rect(x, y, width, height); ImguiUtils.DrawContolBackground(position, Color.black); - style.Draw(position, content, -1); + GUI.Label(position, content, style); } }