From b98b2b038f8d21ae649ed4db2f76bf4d3f607667 Mon Sep 17 00:00:00 2001 From: Die4Ever Date: Wed, 6 Sep 2023 21:44:26 -0500 Subject: [PATCH] HUDSpeedrunSplits adjust width to really slow times, like 10+ hours --- GUI/DeusEx/Classes/HUDSpeedrunSplits.uc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/GUI/DeusEx/Classes/HUDSpeedrunSplits.uc b/GUI/DeusEx/Classes/HUDSpeedrunSplits.uc index 3dc83943f..4ae47c445 100644 --- a/GUI/DeusEx/Classes/HUDSpeedrunSplits.uc +++ b/GUI/DeusEx/Classes/HUDSpeedrunSplits.uc @@ -210,15 +210,26 @@ function string MissionName(int mission) function DrawTextLine(GC gc, string header, string msg, Color c, int x, int y, optional string extra) { + local float w, h; + gc.SetTextColor(colorText); gc.DrawText(x, y, width - x, text_height, header); gc.SetTextColor(c); + + gc.GetTextExtent(0, w, h, header); + left_col = FMax(left_col, w); + text_height = FMax(text_height, h); x += left_col; + gc.DrawText(x, y, width - x, text_height, msg); if(extra == "") return; + gc.GetTextExtent(0, w, h, msg); + center_col = FMax(center_col, w); + text_height = FMax(text_height, h); x += center_col; + gc.DrawText(x, y, width - x, text_height, " " $ extra); } @@ -287,7 +298,7 @@ function DrawBackground(GC gc) defaultproperties { enabled=true - windowWidth=150 + windowWidth=165 windowHeight=80 textfont=Font'DeusExUI.FontMenuHeaders_DS'; colorBackground=(R=0,G=0,B=0,A=100)