2019-10-04 01:29:53 +00:00
|
|
|
|
using PKHeX.Core;
|
|
|
|
|
|
|
|
|
|
namespace PKHeX.WinForms.Controls
|
|
|
|
|
{
|
2020-10-18 18:02:39 +00:00
|
|
|
|
public sealed class SlotChangeInfo<TCursor, TImageSource> where TCursor : class
|
2019-10-04 01:29:53 +00:00
|
|
|
|
{
|
|
|
|
|
public bool LeftMouseIsDown { get; set; }
|
|
|
|
|
public bool DragDropInProgress { get; set; }
|
|
|
|
|
|
2020-10-18 18:02:39 +00:00
|
|
|
|
public TCursor? Cursor { get; set; }
|
|
|
|
|
public string? CurrentPath { get; set; }
|
2019-10-04 01:29:53 +00:00
|
|
|
|
|
2020-10-18 18:02:39 +00:00
|
|
|
|
public SlotViewInfo<TImageSource>? Source { get; set; }
|
|
|
|
|
public SlotViewInfo<TImageSource>? Destination { get; set; }
|
2019-10-04 01:29:53 +00:00
|
|
|
|
|
|
|
|
|
public void Reset()
|
|
|
|
|
{
|
|
|
|
|
LeftMouseIsDown = DragDropInProgress = false;
|
|
|
|
|
CurrentPath = null;
|
|
|
|
|
Cursor = default;
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-18 18:02:39 +00:00
|
|
|
|
public bool SameLocation => (Destination != null) && (Source?.Equals(Destination) ?? false);
|
2019-10-04 01:29:53 +00:00
|
|
|
|
public bool DragIsParty => Source?.Slot is SlotInfoParty || Destination?.Slot is SlotInfoParty;
|
|
|
|
|
}
|
|
|
|
|
}
|