From 2eb057fdd2ade11245b15f4f8513d2c374527617 Mon Sep 17 00:00:00 2001 From: SokyranTheDragon <36712560+SokyranTheDragon@users.noreply.github.com> Date: Tue, 16 Apr 2024 21:38:24 +0200 Subject: [PATCH] Translate "Switch to map" string (#406) --- Source/Client/Persistent/ISwitchToMap.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Client/Persistent/ISwitchToMap.cs b/Source/Client/Persistent/ISwitchToMap.cs index 35e1cf09..0208d06f 100644 --- a/Source/Client/Persistent/ISwitchToMap.cs +++ b/Source/Client/Persistent/ISwitchToMap.cs @@ -36,8 +36,13 @@ static void DoSwitchToMap(Window window, Rect rect) return; using (MpStyle.Set(GameFont.Tiny)) - if (Widgets.ButtonText(new Rect(rect.xMax - 105, 5, 100, 24), "Switch to map")) + { + var switchToMapText = "MpSwitchToMap".Translate(); + var width = switchToMapText.GetWidthCached() + 25; + + if (Widgets.ButtonText(new Rect(rect.xMax - width - 5, 5, width, 24), switchToMapText)) window.Close(); + } } } }