mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-15 00:37:11 +00:00
Tweak dragdrop to computer
When the dragdrop succeeds to a location outside the program, the effect is Move. When the dragdrop succeeds to another slot, the effect is Link. When the dragdrop succeeds to Tabs, the effect is Copy. When the dragdrop fails, the effect is None.
This commit is contained in:
parent
c44d808142
commit
a45b19364d
1 changed files with 2 additions and 1 deletions
|
@ -3363,7 +3363,7 @@ namespace PKHeX
|
|||
pb.BackColor = Color.FromArgb(100, 200, 200, 200);
|
||||
// Thread Blocks on DoDragDrop
|
||||
DragDropEffects result = pb.DoDragDrop(new DataObject(DataFormats.FileDrop, new[] { newfile }), DragDropEffects.Move);
|
||||
if (result == DragDropEffects.None || result == DragDropEffects.Copy) // not dropped to another box slot, restore img
|
||||
if (result != DragDropEffects.Link) // not dropped to another box slot, restore img
|
||||
pb.Image = img;
|
||||
if (result == DragDropEffects.Copy) // viewed in tabs, apply 'view' highlight
|
||||
getSlotColor(slotSourceSlotNumber, Properties.Resources.slotView);
|
||||
|
@ -3458,6 +3458,7 @@ namespace PKHeX
|
|||
SAV.setStoredSlot(pkz, slotDestinationOffset);
|
||||
getQuickFiller(SlotPictureBoxes[slotDestinationSlotNumber], pkz);
|
||||
|
||||
e.Effect = DragDropEffects.Link;
|
||||
slotSourceOffset = 0; // Clear offset value
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue