PKHeX/PKHeX.WinForms/Controls/SAV Editor/SlotTrackerImage.cs
Kurt bf6c25eca7 Break up SlotChangeManager logic
A little bit cleaner when the logic is separated
Keep an abstraction of BoxEdit to cache the current box contents.
Already fetched to show sprites; any future fetches (for preview text /
hover sprite) can reuse the already fetched pkm data.

Should probably rewrite this stuff completely, but effort better spent
elsewhere
2019-08-20 19:50:28 -07:00

27 lines
693 B
C#

using System.Drawing;
using System.Windows.Forms;
using PKHeX.Core;
namespace PKHeX.WinForms.Controls
{
public class SlotTrackerImage : SlotTracker<PictureBox>
{
public Image InteractionColor { get; private set; }
public Image OriginalBackground { get; set; }
public Image CurrentBackground { get; set; }
public void Reset()
{
Box = Slot = -1;
OriginalBackground = CurrentBackground = null;
}
public void SetInteraction(int box, int slot, Image img)
{
Box = box;
Slot = slot;
InteractionColor = img;
OriginalBackground = img;
}
}
}