From 1518dc94a39dbb543095df19f67692aef49970cd Mon Sep 17 00:00:00 2001 From: slarticodefast <161409025+slarticodefast@users.noreply.github.com> Date: Thu, 17 Oct 2024 23:32:59 +0200 Subject: [PATCH] fix playtime stats window (#32856) --- .../Info/PlaytimeStats/PlaytimeStatsEntry.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Content.Client/Info/PlaytimeStats/PlaytimeStatsEntry.cs b/Content.Client/Info/PlaytimeStats/PlaytimeStatsEntry.cs index aff01800f9..16e8f55a7e 100644 --- a/Content.Client/Info/PlaytimeStats/PlaytimeStatsEntry.cs +++ b/Content.Client/Info/PlaytimeStats/PlaytimeStatsEntry.cs @@ -16,19 +16,10 @@ public sealed partial class PlaytimeStatsEntry : ContainerButton RoleLabel.Text = role; Playtime = playtime; // store the TimeSpan value directly - PlaytimeLabel.Text = ConvertTimeSpanToHoursMinutes(playtime); // convert to string for display + PlaytimeLabel.Text = playtime.ToString(Loc.GetString("ui-playtime-time-format")); // convert to string for display BackgroundColorPanel.PanelOverride = styleBox; } - private static string ConvertTimeSpanToHoursMinutes(TimeSpan timeSpan) - { - var hours = (int)timeSpan.TotalHours; - var minutes = timeSpan.Minutes; - - var formattedTimeLoc = Loc.GetString("ui-playtime-time-format", ("hours", hours), ("minutes", minutes)); - return formattedTimeLoc; - } - public void UpdateShading(StyleBoxFlat styleBox) { BackgroundColorPanel.PanelOverride = styleBox; -- 2.52.0