Spellbreak Icon Support & Some Fixes

Added GCharacterPerk Support, Fixed GCosmeticCard to show Names & Descriptions, however it's not perfect yet.
This commit is contained in:
Ricky Owens 2020-10-11 14:57:45 -04:00 committed by GitHub
parent cc0b094ad2
commit fb34ebd488
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
using FModel.Creator.Bases;
using FModel.Creator.Bases;
using FModel.Creator.Bundles;
using FModel.Creator.Icons;
using FModel.Creator.Rarities;
@ -346,7 +346,7 @@ namespace FModel.Creator
// }
case "GAccolade":
case "GCosmeticSkin":
case "GCosmeticCard":
case "GCharacterPerk":
case "GCosmeticTitle":
case "GCosmeticBadge":
case "GCosmeticEmote":
@ -388,6 +388,39 @@ namespace FModel.Creator
}
return true;
}
case "GCosmeticCard":
{
BaseGCosmetic icon = new BaseGCosmetic(exports[index], exportType);
using (var ret = new SKBitmap(icon.Width, icon.Height, SKColorType.Rgba8888, SKAlphaType.Premul))
using (var c = new SKCanvas(ret))
{
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign == EIconDesign.Flat)
{
icon.Draw(c);
}
else
{
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
Rarity.DrawRarity(c, icon);
}
}
LargeSmallImage.DrawPreviewImage(c, icon);
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoBackground)
{
if ((EIconDesign)Properties.Settings.Default.AssetsIconDesign != EIconDesign.NoText)
{
Text.DrawBackground(c, icon);
Text.DrawDisplayName(c, icon);
Text.DrawDescription(c, icon);
}
}
ImageBoxVm.imageBoxViewModel.Set(ret, assetName);
}
return true;
}
}
return false;
}