mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Remove picturebox references
sprite gen is more than adequate
This commit is contained in:
parent
e8644280a1
commit
c24a48e815
1 changed files with 4 additions and 4 deletions
|
@ -60,13 +60,13 @@ namespace PKHeX.WinForms.Controls
|
|||
return;
|
||||
BeginHoverSlot(pb);
|
||||
}
|
||||
private Bitmap GetGlowSprite(PictureBox pb, PKM pk)
|
||||
private Bitmap GetGlowSprite(PKM pk)
|
||||
{
|
||||
var baseSprite = SpriteUtil.GetSprite(pk.Species, pk.AltForm, pk.Gender, 0, pk.IsEgg, false, pk.Format);
|
||||
|
||||
var pixels = ImageUtil.GetPixelData((Bitmap)baseSprite);
|
||||
ImageUtil.GlowEdges(pixels, new[] {GlowInitial.B, GlowInitial.G, GlowInitial.R}, pb.Image.Width);
|
||||
return ImageUtil.GetBitmap(pixels, pb.Image.Width, pb.Image.Height);
|
||||
ImageUtil.GlowEdges(pixels, new[] {GlowInitial.B, GlowInitial.G, GlowInitial.R}, baseSprite.Width);
|
||||
return ImageUtil.GetBitmap(pixels, baseSprite.Width, baseSprite.Height);
|
||||
}
|
||||
private void BeginHoverSlot(PictureBox pb)
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ namespace PKHeX.WinForms.Controls
|
|||
{
|
||||
HoverWorker?.Stop();
|
||||
|
||||
var GlowBase = GetGlowSprite(pb, pk);
|
||||
var GlowBase = GetGlowSprite(pk);
|
||||
hover = ImageUtil.LayerImage(GlowBase, Resources.slotHover, 0, 0);
|
||||
HoverWorker = new BitmapAnimator(GlowBase, Resources.slotHover) { GlowFromColor = GlowInitial, GlowToColor = GlowFinal };
|
||||
HoverWorker.Start(pb, OriginalBackground);
|
||||
|
|
Loading…
Reference in a new issue