mirror of
https://github.com/4sval/FModel.git
synced 2026-03-21 17:24:26 -05:00
Merge pull request #124 from iFireMonkey/master
Spellbreak Icon Fixes + Additions
This commit is contained in:
commit
16347b0982
|
|
@ -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
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user