From 05ec0b8c114ebd55e5547639b3a3cdb55a38bd6a Mon Sep 17 00:00:00 2001 From: goat Date: Sat, 20 Jul 2024 01:11:09 +0200 Subject: [PATCH] pi: show release date on changelog entries --- .../Windows/PluginInstaller/PluginInstallerWindow.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs index d4700ddb5..99dc33e44 100644 --- a/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs +++ b/Dalamud/Interface/Internal/Windows/PluginInstaller/PluginInstallerWindow.cs @@ -2276,6 +2276,16 @@ internal class PluginInstallerWindow : Window, IDisposable ImGui.TextColored(ImGuiColors.DalamudGrey3, Locs.PluginBody_AuthorWithoutDownloadCount(log.Author)); } + if (log.Date != DateTime.MinValue) + { + var whenText = log.Date.LocRelativePastLong(); + var whenSize = ImGui.CalcTextSize(whenText); + ImGui.SameLine(ImGui.GetWindowWidth() - whenSize.X - (25 * ImGuiHelpers.GlobalScale)); + ImGui.TextColored(ImGuiColors.DalamudGrey3, whenText); + if (ImGui.IsItemHovered()) + ImGui.SetTooltip("Published on " + log.Date.LocAbsolute()); + } + cursor.Y += ImGui.GetTextLineHeightWithSpacing(); ImGui.SetCursorPos(cursor);