From b2d50ba2b05123ae6862daf83a3851d53cf9ebb2 Mon Sep 17 00:00:00 2001 From: mibac138 <5672750+mibac138@users.noreply.github.com> Date: Mon, 22 Sep 2025 01:03:49 +0200 Subject: [PATCH] DebugModeLabel: fix cut off text when Disable tiny font is enabled --- Source/Client/UI/IngameDebug.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/Client/UI/IngameDebug.cs b/Source/Client/UI/IngameDebug.cs index caf62a3a..9f76da95 100644 --- a/Source/Client/UI/IngameDebug.cs +++ b/Source/Client/UI/IngameDebug.cs @@ -143,17 +143,19 @@ internal static float DoDevInfo(float y) internal static float DoDebugModeLabel(float y) { - float x = UI.screenWidth - BtnWidth - BtnMargin; + const float width = 90f; + float x = UI.screenWidth - width - BtnMargin; if (Multiplayer.Client != null && Multiplayer.GameComp.debugMode) { var text = "Debug mode\n"; if (Multiplayer.LocalServer != null) text += "Host"; else text += "Client"; + var height = Text.CalcHeight(text, width); using (MpStyle.Set(GameFont.Tiny).Set(TextAnchor.MiddleCenter)) - Widgets.Label(new Rect(x, y, BtnWidth, 30f), text); + Widgets.Label(new Rect(x, y, width, height), text); - return BtnHeight; + return height; } return 0;