mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-09-13 16:45:23 -05: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:
@@ -3363,7 +3363,7 @@ private void pbBoxSlot_MouseMove(object sender, MouseEventArgs e)
|
||||
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 @@ private void pbBoxSlot_DragDrop(object sender, DragEventArgs e)
|
||||
SAV.setStoredSlot(pkz, slotDestinationOffset);
|
||||
getQuickFiller(SlotPictureBoxes[slotDestinationSlotNumber], pkz);
|
||||
|
||||
e.Effect = DragDropEffects.Link;
|
||||
slotSourceOffset = 0; // Clear offset value
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user