From fb34ebd4880fae7c7cc6bc87e38b3c6d83b4bd54 Mon Sep 17 00:00:00 2001 From: Ricky Owens <38590471+iFireMonkey@users.noreply.github.com> Date: Sun, 11 Oct 2020 14:57:45 -0400 Subject: [PATCH 1/2] Spellbreak Icon Support & Some Fixes Added GCharacterPerk Support, Fixed GCosmeticCard to show Names & Descriptions, however it's not perfect yet. --- FModel/Creator/Creator.cs | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/FModel/Creator/Creator.cs b/FModel/Creator/Creator.cs index a0b7f9bb..28b92720 100644 --- a/FModel/Creator/Creator.cs +++ b/FModel/Creator/Creator.cs @@ -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; } From 9a4919f9de90229496914bb2912afa40cffe6d89 Mon Sep 17 00:00:00 2001 From: Ricky Owens <38590471+iFireMonkey@users.noreply.github.com> Date: Sun, 11 Oct 2020 14:58:42 -0400 Subject: [PATCH 2/2] Changes GCosmeticCard sizing [Spellbreak] Also added a note regarding the stretch done to the Spellbreak Cards --- FModel/Creator/Bases/BaseGCosmetic.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FModel/Creator/Bases/BaseGCosmetic.cs b/FModel/Creator/Bases/BaseGCosmetic.cs index f5eaa4bc..cc9241ff 100644 --- a/FModel/Creator/Bases/BaseGCosmetic.cs +++ b/FModel/Creator/Bases/BaseGCosmetic.cs @@ -1,4 +1,4 @@ -using FModel.Creator.Rarities; +using FModel.Creator.Rarities; using FModel.Creator.Texts; using PakReader.Parsers.Class; using PakReader.Parsers.PropertyTagData; @@ -36,12 +36,12 @@ namespace FModel.Creator.Bases Description = ""; Width = exportType switch { - "GCosmeticCard" => 1024, + "GCosmeticCard" => 1536, _ => 512 }; Height = exportType switch { - "GCosmeticCard" => 200, + "GCosmeticCard" => 450, // Not perfect, causes images to get stretched a bit, but actually allows text to show up so it works for now. - FireMonkey _ => 512 }; }