From 518d5fe95fdeb79e84ac01b842388db0665d0767 Mon Sep 17 00:00:00 2001 From: SokyranTheDragon Date: Fri, 1 Dec 2023 02:41:45 +0100 Subject: [PATCH] Translate "Switch to map" string Will require an update to Multiplayer Local as well. --- 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(); + } } } }