mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-08-02 18:30:00 -05:00
Show encounter's full details on hover (mgdb/encdb)
Won't work neatly for Mystery Gift types since those aren't record types.
This commit is contained in:
parent
8c4ca3134a
commit
ecf1f361fe
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user