mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-20 17:33:25 +00:00
11b2dc35d7
pkm editor, sav editor, menus, and a manager to glue the storage slots
together
decouples the pkm/sav editors from a static savefile reference.
improves dragdrop/click view/set/delete indication, hides unavailable
contextmenuitems, and fixes a few incorrect references. Box Subviewer
slots now have all the indication/events that the main save editor slots
have.
pls report behavior bugs 👍
34 lines
909 B
C#
34 lines
909 B
C#
using PKHeX.Core;
|
|
|
|
namespace PKHeX.WinForms
|
|
{
|
|
public class SlotChangeInfo
|
|
{
|
|
public bool LeftMouseIsDown;
|
|
public bool RightMouseIsDown;
|
|
public bool DragDropInProgress;
|
|
|
|
public object Cursor;
|
|
public string CurrentPath;
|
|
|
|
public SlotChange Source;
|
|
public SlotChange Destination;
|
|
|
|
public readonly byte[] BlankData;
|
|
|
|
public SlotChangeInfo(SaveFile sav)
|
|
{
|
|
BlankData = sav.BlankPKM.EncryptedPartyData;
|
|
Reset();
|
|
}
|
|
|
|
public bool SameSlot => Source.Slot == Destination.Slot && Source.Box == Destination.Box;
|
|
public void Reset()
|
|
{
|
|
LeftMouseIsDown = RightMouseIsDown = DragDropInProgress = false;
|
|
Source = new SlotChange {OriginalData = BlankData};
|
|
Destination = new SlotChange();
|
|
Cursor = CurrentPath = null;
|
|
}
|
|
}
|
|
}
|