From ecf1f361fefeb587c2325fa09007ed1fb78c12e4 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 4 Apr 2021 12:05:00 -0700 Subject: [PATCH] Show encounter's full details on hover (mgdb/encdb) Won't work neatly for Mystery Gift types since those aren't record types. --- PKHeX.WinForms/Controls/Slots/SummaryPreviewer.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/PKHeX.WinForms/Controls/Slots/SummaryPreviewer.cs b/PKHeX.WinForms/Controls/Slots/SummaryPreviewer.cs index 00af5d864..a53c08217 100644 --- a/PKHeX.WinForms/Controls/Slots/SummaryPreviewer.cs +++ b/PKHeX.WinForms/Controls/Slots/SummaryPreviewer.cs @@ -10,7 +10,7 @@ namespace PKHeX.WinForms.Controls { public sealed class SummaryPreviewer { - private readonly ToolTip ShowSet = new() { InitialDelay = 200, IsBalloon = false }; + private readonly ToolTip ShowSet = new() { InitialDelay = 200, IsBalloon = false, AutoPopDelay = 32_767 }; public void Show(Control pb, PKM pk) { @@ -51,6 +51,16 @@ public void Show(Control pb, IEncounterInfo enc) ? $"Level: {enc.LevelMin}" : $"Level: {enc.LevelMin}-{enc.LevelMax}"); +#if DEBUG + // Record types! Can get a nice summary. + // Won't work neatly for Mystery Gift types since those aren't record types. + if (enc is not MysteryGift) + { + var raw = enc.ToString(); + lines.AddRange(raw.Split(',', '}', '{')); + } +#endif + var text = string.Join(Environment.NewLine, lines); ShowSet.SetToolTip(pb, text); }