private void ImportNewSprite(Bitmap bmp, string sourceFileName)
{
bool useAlphaChannel = AskAboutAlphaChannel(bmp);
SpriteImportWindow impWin = new SpriteImportWindow(bmp);
if (impWin.ShowDialog() == DialogResult.OK)
{
foreach (Bitmap bmpToImport in impWin.SelectedBitmaps)
{
Sprite newSprite = CreateSpriteForBitmap(bmpToImport, impWin.RemapToGamePalette, impWin.UseBackgroundSlots, useAlphaChannel);
if ((bmpToImport.Width == bmp.Width) &&
(bmpToImport.Height == bmp.Height))
{
newSprite.SourceFile = Utilities.GetRelativeToProjectPath(sourceFileName);
}
}
RefreshSpriteDisplay();
}
impWin.Dispose();
}