mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Add showdownset preview bubble for slot views
Hold control when you move your mouse to enter the slot's control area (ie put your mouse on the sprite while holding control); the program will display a ShowdownSet summary of the contents so you don't have to load to tabs. Holding Control is required for now (can always recompile to have it always on); can be a nuisance for those not wanting to view details since it overlays a big window (obscuring). Closes #1925
This commit is contained in:
parent
232427d002
commit
c8cdff8abc
1 changed files with 11 additions and 1 deletions
|
@ -29,7 +29,7 @@ namespace PKHeX.WinForms.Controls
|
|||
public readonly List<BoxEditor> Boxes = new List<BoxEditor>();
|
||||
public readonly List<ISlotViewer<PictureBox>> OtherSlots = new List<ISlotViewer<PictureBox>>();
|
||||
public event DragEventHandler RequestExternalDragDrop;
|
||||
private readonly ToolTip ShowSet = new ToolTip();
|
||||
private readonly ToolTip ShowSet = new ToolTip {InitialDelay = 200, IsBalloon = true};
|
||||
|
||||
public SlotChangeManager(SAVEditor se)
|
||||
{
|
||||
|
@ -51,7 +51,17 @@ namespace PKHeX.WinForms.Controls
|
|||
OriginalBackground = pb.BackgroundImage;
|
||||
pb.BackgroundImage = CurrentBackground = pb.BackgroundImage == null ? Resources.slotHover : ImageUtil.LayerImage(pb.BackgroundImage, Resources.slotHover, 0, 0, 1);
|
||||
if (!DragActive)
|
||||
{
|
||||
SetCursor(Cursors.Hand, sender);
|
||||
}
|
||||
else
|
||||
{
|
||||
var view = WinFormsUtil.FindFirstControlOfType<ISlotViewer<PictureBox>>(pb);
|
||||
var data = view.GetSlotData(pb);
|
||||
var pk = SAV.GetStoredSlot(data.Offset);
|
||||
if (pk.Species > 0 && Control.ModifierKeys.HasFlag(Keys.Control))
|
||||
ShowSet.SetToolTip(pb, pk.ShowdownText);
|
||||
}
|
||||
}
|
||||
public void MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue