mirror of
https://github.com/4sval/FModel.git
synced 2026-04-21 09:07:45 -05:00
FModel 2.4.3
This commit is contained in:
parent
e9f34dfca9
commit
8812e70d6f
|
|
@ -146,6 +146,7 @@
|
|||
<Compile Include="Methods\AESManager\DynamicKeys\Keychain.cs" />
|
||||
<Compile Include="Methods\IconGenerator\ChallengeGenerator\BundleDesign.cs" />
|
||||
<Compile Include="Methods\IconGenerator\ChallengeGenerator\BundleInfos.cs" />
|
||||
<Compile Include="Methods\IconGenerator\ChallengeGenerator\ChallengeInfoEntry.cs" />
|
||||
<Compile Include="Methods\IconGenerator\ChallengeGenerator\DrawingRewards.cs" />
|
||||
<Compile Include="Methods\DLLImport.cs" />
|
||||
<Compile Include="Methods\IconGenerator\ItemGenerator\DrawText.cs" />
|
||||
|
|
|
|||
|
|
@ -148,19 +148,19 @@ namespace FModel.Forms
|
|||
{
|
||||
if (comboBox1.SelectedIndex == 0)
|
||||
{
|
||||
Properties.Settings.Default.tConsKey = textBox5.Text;
|
||||
Properties.Settings.Default.tConsKey = textBox5.Text.Replace(" ", string.Empty);
|
||||
}
|
||||
if (comboBox1.SelectedIndex == 1)
|
||||
{
|
||||
Properties.Settings.Default.tConsSecret = textBox5.Text;
|
||||
Properties.Settings.Default.tConsSecret = textBox5.Text.Replace(" ", string.Empty);
|
||||
}
|
||||
if (comboBox1.SelectedIndex == 2)
|
||||
{
|
||||
Properties.Settings.Default.tToken = textBox5.Text;
|
||||
Properties.Settings.Default.tToken = textBox5.Text.Replace(" ", string.Empty);
|
||||
}
|
||||
if (comboBox1.SelectedIndex == 3)
|
||||
{
|
||||
Properties.Settings.Default.tTokenSecret = textBox5.Text;
|
||||
Properties.Settings.Default.tTokenSecret = textBox5.Text.Replace(" ", string.Empty);
|
||||
}
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
|
|
|
|||
1
FModel/Forms/UpdateModeSettings.Designer.cs
generated
1
FModel/Forms/UpdateModeSettings.Designer.cs
generated
|
|
@ -268,6 +268,7 @@ namespace FModel.Forms
|
|||
"[STW] Heroes",
|
||||
"[STW] Defenders",
|
||||
"[STW] Workers",
|
||||
"[STW] Schematics",
|
||||
"[STW] Traps",
|
||||
"[STW] Weapons",
|
||||
"[STW] Ingredients",
|
||||
|
|
|
|||
|
|
@ -88,12 +88,13 @@ namespace FModel.Forms
|
|||
if (checkedListBox1.GetItemCheckState(8) == CheckState.Checked) { sb.Append("STWHeros,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/Heroes/"); }
|
||||
if (checkedListBox1.GetItemCheckState(9) == CheckState.Checked) { sb.Append("STWDefenders,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/Items/Defenders/"); }
|
||||
if (checkedListBox1.GetItemCheckState(10) == CheckState.Checked) { sb.Append("STWWorkers,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/Items/Workers/"); }
|
||||
if (checkedListBox1.GetItemCheckState(11) == CheckState.Checked) { sb.Append("STWTraps,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/Items/Traps/"); }
|
||||
if (checkedListBox1.GetItemCheckState(12) == CheckState.Checked) { sb.Append("STWWeapons,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/Items/Weapons/"); }
|
||||
if (checkedListBox1.GetItemCheckState(13) == CheckState.Checked) { sb.Append("STWIngredients,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/Items/Ingredients/"); }
|
||||
if (checkedListBox1.GetItemCheckState(14) == CheckState.Checked) { sb.Append("STWResources,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/Items/PersistentResources/"); }
|
||||
if (checkedListBox1.GetItemCheckState(15) == CheckState.Checked) { sb.Append("STWCardpacks,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/Items/CardPacks/"); }
|
||||
if (checkedListBox1.GetItemCheckState(16) == CheckState.Checked) { sb.Append("Tokens,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/Items/Tokens/"); }
|
||||
if (checkedListBox1.GetItemCheckState(11) == CheckState.Checked) { sb.Append("STWSchematics,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/Items/Schematics/"); }
|
||||
if (checkedListBox1.GetItemCheckState(12) == CheckState.Checked) { sb.Append("STWTraps,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/Items/Traps/"); }
|
||||
if (checkedListBox1.GetItemCheckState(13) == CheckState.Checked) { sb.Append("STWWeapons,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/Items/Weapons/"); }
|
||||
if (checkedListBox1.GetItemCheckState(14) == CheckState.Checked) { sb.Append("STWIngredients,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/Items/Ingredients/"); }
|
||||
if (checkedListBox1.GetItemCheckState(15) == CheckState.Checked) { sb.Append("STWResources,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/Items/PersistentResources/"); }
|
||||
if (checkedListBox1.GetItemCheckState(16) == CheckState.Checked) { sb.Append("STWCardpacks,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/Items/CardPacks/"); }
|
||||
if (checkedListBox1.GetItemCheckState(17) == CheckState.Checked) { sb.Append("Tokens,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/Items/Tokens/"); }
|
||||
|
||||
if (checkedListBox2.GetItemCheckState(0) == CheckState.Checked) { sb.Append("T2DAssets,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/2dAssets/"); }
|
||||
if (checkedListBox2.GetItemCheckState(1) == CheckState.Checked) { sb.Append("TFeatured,"); RegisterSettings.updateModeListParameters.Add("FortniteGame/Content/UI/Foundation/Textures/BattleRoyale/FeaturedItems/"); }
|
||||
|
|
@ -153,24 +154,27 @@ namespace FModel.Forms
|
|||
case "STWWorkers":
|
||||
checkedListBox1.SetItemChecked(10, true);
|
||||
break;
|
||||
case "STWTraps":
|
||||
case "STWSchematics":
|
||||
checkedListBox1.SetItemChecked(11, true);
|
||||
break;
|
||||
case "STWWeapons":
|
||||
case "STWTraps":
|
||||
checkedListBox1.SetItemChecked(12, true);
|
||||
break;
|
||||
case "STWIngredients":
|
||||
case "STWWeapons":
|
||||
checkedListBox1.SetItemChecked(13, true);
|
||||
break;
|
||||
case "STWResources":
|
||||
case "STWIngredients":
|
||||
checkedListBox1.SetItemChecked(14, true);
|
||||
break;
|
||||
case "STWCardpacks":
|
||||
case "STWResources":
|
||||
checkedListBox1.SetItemChecked(15, true);
|
||||
break;
|
||||
case "Tokens":
|
||||
case "STWCardpacks":
|
||||
checkedListBox1.SetItemChecked(16, true);
|
||||
break;
|
||||
case "Tokens":
|
||||
checkedListBox1.SetItemChecked(17, true);
|
||||
break;
|
||||
case "T2DAssets":
|
||||
checkedListBox2.SetItemChecked(0, true);
|
||||
break;
|
||||
|
|
|
|||
12
FModel/MainWindow.Designer.cs
generated
12
FModel/MainWindow.Designer.cs
generated
|
|
@ -46,6 +46,7 @@ namespace FModel
|
|||
this.settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.filesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.saveAsJSONToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.copySelectedFilePathToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
|
|
@ -87,7 +88,6 @@ namespace FModel
|
|||
this.saveAsJSONToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.extractFolderContentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.autoSaveAsJSONToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
|
|
@ -244,6 +244,11 @@ namespace FModel
|
|||
this.searchToolStripMenuItem.Text = "Search";
|
||||
this.searchToolStripMenuItem.Click += new System.EventHandler(this.searchToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator7
|
||||
//
|
||||
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
||||
this.toolStripSeparator7.Size = new System.Drawing.Size(194, 6);
|
||||
//
|
||||
// saveAsJSONToolStripMenuItem
|
||||
//
|
||||
this.saveAsJSONToolStripMenuItem.Name = "saveAsJSONToolStripMenuItem";
|
||||
|
|
@ -616,11 +621,6 @@ namespace FModel
|
|||
this.extractFolderContentsToolStripMenuItem.Text = "Extract Folder Contents";
|
||||
this.extractFolderContentsToolStripMenuItem.Click += new System.EventHandler(this.ExtractFolderContentsToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator7
|
||||
//
|
||||
this.toolStripSeparator7.Name = "toolStripSeparator7";
|
||||
this.toolStripSeparator7.Size = new System.Drawing.Size(194, 6);
|
||||
//
|
||||
// autoSaveAsJSONToolStripMenuItem
|
||||
//
|
||||
this.autoSaveAsJSONToolStripMenuItem.CheckOnClick = true;
|
||||
|
|
|
|||
|
|
@ -882,20 +882,24 @@ namespace FModel
|
|||
{
|
||||
new UpdateMyState(ThePak.CurrentUsedItem + " successfully serialized", "Success").ChangeProcessState();
|
||||
|
||||
Invoke(new Action(() =>
|
||||
try
|
||||
{
|
||||
try
|
||||
string parsedData = JToken.Parse(JohnWick.MyAsset.GetSerialized()).ToString();
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
scintilla1.Text = JToken.Parse(JohnWick.MyAsset.GetSerialized()).ToString();
|
||||
}
|
||||
catch (JsonReaderException)
|
||||
{
|
||||
new UpdateMyConsole(ThePak.CurrentUsedItem + " ", Color.Red).AppendToConsole();
|
||||
new UpdateMyConsole(".JSON file can't be displayed", Color.Black, true).AppendToConsole();
|
||||
}
|
||||
}));
|
||||
|
||||
NavigateThroughJson(JohnWick.MyAsset, Checking.ExtractedFilePath);
|
||||
scintilla1.Text = parsedData;
|
||||
}));
|
||||
}
|
||||
catch (JsonReaderException)
|
||||
{
|
||||
new UpdateMyConsole(ThePak.CurrentUsedItem + " ", Color.Red).AppendToConsole();
|
||||
new UpdateMyConsole(".JSON file can't be displayed", Color.Black, true).AppendToConsole();
|
||||
}
|
||||
finally
|
||||
{
|
||||
AutoSaveAsJSON();
|
||||
NavigateThroughJson(JohnWick.MyAsset, Checking.ExtractedFilePath);
|
||||
}
|
||||
}
|
||||
else { throw new ArgumentException("Can't serialize this file"); }
|
||||
}
|
||||
|
|
@ -1048,7 +1052,6 @@ namespace FModel
|
|||
pictureBox1.Image = bmp;
|
||||
|
||||
AutoSaveImage();
|
||||
AutoSaveAsJSON();
|
||||
g.Dispose();
|
||||
}
|
||||
|
||||
|
|
@ -1133,7 +1136,6 @@ namespace FModel
|
|||
}
|
||||
|
||||
AutoSaveImage();
|
||||
AutoSaveAsJSON();
|
||||
BundleDesign.toDrawOn.Dispose(); //actually this is the most useful thing in this method
|
||||
}
|
||||
|
||||
|
|
@ -1145,7 +1147,6 @@ namespace FModel
|
|||
pictureBox1.Image = SchematicIconDesign.schematicBitmap;
|
||||
|
||||
AutoSaveImage();
|
||||
AutoSaveAsJSON();
|
||||
SchematicIconDesign.toDrawOn.Dispose();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@
|
|||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABa
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAegBAQHoAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
CAAAAk1TRnQBSQFMAgEBAgEAAfABAQHwAQEBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ using Newtonsoft.Json.Linq;
|
|||
|
||||
namespace FModel
|
||||
{
|
||||
//TODO: REFACTOR + NEW DESIGN
|
||||
static class BundleDesign
|
||||
{
|
||||
public static string BundlePath { get; set; }
|
||||
|
|
@ -42,74 +43,124 @@ namespace FModel
|
|||
JToken displayStyle = myBundle["DisplayStyle"];
|
||||
if (displayStyle != null)
|
||||
{
|
||||
//main header
|
||||
toDrawOn.FillRectangle(new SolidBrush(BundleInfos.getSecondaryColor(myBundle)), new Rectangle(0, 0, myBitmap.Width, 281));
|
||||
|
||||
//gradient at left and right main header
|
||||
LinearGradientBrush linGrBrush_left = new LinearGradientBrush(new Point(0, 282 / 2), new Point(282, 282 / 2),
|
||||
ControlPaint.Light(BundleInfos.getSecondaryColor(myBundle), (float)0.3), BundleInfos.getSecondaryColor(myBundle));
|
||||
toDrawOn.FillRectangle(linGrBrush_left, new Rectangle(0, 0, 282, 282));
|
||||
LinearGradientBrush linGrBrush_right = new LinearGradientBrush(new Point(2500, 282 / 2), new Point(1500, 282 / 2),
|
||||
ControlPaint.Light(BundleInfos.getSecondaryColor(myBundle), (float)0.3), BundleInfos.getSecondaryColor(myBundle));
|
||||
toDrawOn.FillRectangle(linGrBrush_right, new Rectangle(1500, 0, 1000, 282));
|
||||
|
||||
//last folder with border
|
||||
GraphicsPath p = new GraphicsPath();
|
||||
Pen myPen = new Pen(ControlPaint.Light(BundleInfos.getSecondaryColor(myBundle), (float)0.2), 3);
|
||||
myPen.LineJoin = LineJoin.Round; //needed to avoid spikes
|
||||
p.AddString(
|
||||
Utilities.CaseInsensitiveContains(BundleInfos.getLastFolder(BundlePath), "SEASON", StringComparison.CurrentCultureIgnoreCase) ?
|
||||
SearchResource.getTextByKey("15EB9C4A494F597285CC5CA2EAA571E1", "SEASON") + " " + BundleInfos.getLastFolder(BundlePath).Substring(BundleInfos.getLastFolder(BundlePath).Length - 1) :
|
||||
BundleInfos.getLastFolder(BundlePath),
|
||||
Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1],
|
||||
(int)FontStyle.Regular, 55,
|
||||
new Point(342, 40),
|
||||
FontUtilities.leftString
|
||||
);
|
||||
toDrawOn.DrawPath(myPen, p);
|
||||
toDrawOn.FillPath(new SolidBrush(ControlPaint.Dark(BundleInfos.getSecondaryColor(myBundle), (float)0.05)), p);
|
||||
|
||||
//name
|
||||
toDrawOn.DrawString(BundleInfos.getBundleDisplayName(myItem), new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1], 115), new SolidBrush(Color.White), new Point(325, 70));
|
||||
Color headerColor = BundleInfos.getSecondaryColor(myBundle);
|
||||
|
||||
//image
|
||||
JToken customBackground = displayStyle["CustomBackground"];
|
||||
JToken displayImage = displayStyle["DisplayImage"];
|
||||
JToken largePreviewImage = myBundle["LargePreviewImage"];
|
||||
if (displayImage != null)
|
||||
if (customBackground != null && !ThePak.CurrentUsedItem.Equals("QuestBundle_S10_SeasonX"))
|
||||
{
|
||||
JToken assetPathName = displayImage["asset_path_name"];
|
||||
JToken assetPathName = customBackground["asset_path_name"];
|
||||
if (assetPathName != null)
|
||||
{
|
||||
string textureFile = Path.GetFileName(assetPathName.Value<string>()).Substring(0, Path.GetFileName(assetPathName.Value<string>()).LastIndexOf('.'));
|
||||
Image challengeIcon;
|
||||
using (var bmpTemp = new Bitmap(JohnWick.AssetToTexture2D(textureFile)))
|
||||
using (Bitmap bmpTemp = new Bitmap(JohnWick.AssetToTexture2D(textureFile)))
|
||||
{
|
||||
challengeIcon = new Bitmap(bmpTemp);
|
||||
}
|
||||
toDrawOn.DrawImage(ImageUtilities.ResizeImage(challengeIcon, 282, 282), new Point(40, 0));
|
||||
}
|
||||
}
|
||||
else if (largePreviewImage != null)
|
||||
{
|
||||
JToken assetPathName = largePreviewImage["asset_path_name"];
|
||||
if (assetPathName != null)
|
||||
{
|
||||
string textureFile = Path.GetFileName(assetPathName.Value<string>()).Substring(0, Path.GetFileName(assetPathName.Value<string>()).LastIndexOf('.'));
|
||||
Image challengeIcon;
|
||||
using (var bmpTemp = new Bitmap(JohnWick.AssetToTexture2D(textureFile)))
|
||||
{
|
||||
challengeIcon = new Bitmap(bmpTemp);
|
||||
}
|
||||
toDrawOn.DrawImage(ImageUtilities.ResizeImage(challengeIcon, 282, 282), new Point(40, 0));
|
||||
toDrawOn.DrawImage(ImageUtilities.ResizeImage(challengeIcon, challengeIcon.Width * 3, challengeIcon.Height * 3), new Point(0, challengeIcon.Height - (challengeIcon.Height * 3)));
|
||||
toDrawOn.FillRectangle(new SolidBrush(Color.FromArgb(150, headerColor.R, headerColor.G, headerColor.B)), new Rectangle(0, 0, myBitmap.Width, 256));
|
||||
|
||||
GraphicsPath gp = new GraphicsPath();
|
||||
gp.StartFigure();
|
||||
gp.AddLine(0, 256, myBitmap.Width, 256);
|
||||
gp.AddLine(myBitmap.Width, 256, myBitmap.Width, 241);
|
||||
gp.AddLine(myBitmap.Width, 241, myBitmap.Width / 2 + 25, 236);
|
||||
gp.AddLine(myBitmap.Width / 2 + 25, 236, myBitmap.Width / 2 + 35, 249);
|
||||
gp.AddLine(myBitmap.Width / 2 + 35, 249, 0, 241);
|
||||
gp.CloseFigure();
|
||||
|
||||
toDrawOn.FillPath(new SolidBrush(ControlPaint.Light(headerColor)), gp);
|
||||
}
|
||||
|
||||
//last folder with border
|
||||
GraphicsPath p = new GraphicsPath();
|
||||
Pen myPen = new Pen(ControlPaint.Light(headerColor, (float)0.2), 3);
|
||||
myPen.LineJoin = LineJoin.Round; //needed to avoid spikes
|
||||
p.AddString(
|
||||
BundleInfos.getLastFolder(BundlePath),
|
||||
Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1],
|
||||
(int)FontStyle.Regular, 55,
|
||||
new Point(50, 30),
|
||||
FontUtilities.leftString
|
||||
);
|
||||
toDrawOn.DrawPath(myPen, p);
|
||||
toDrawOn.FillPath(new SolidBrush(ControlPaint.Dark(headerColor, (float)0.05)), p);
|
||||
|
||||
//name
|
||||
toDrawOn.DrawString(BundleInfos.getBundleDisplayName(myItem), new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1], 115), new SolidBrush(Color.White), new Point(35, 55));
|
||||
|
||||
//fill the rest
|
||||
toDrawOn.FillRectangle(new SolidBrush(ControlPaint.Dark(BundleInfos.getSecondaryColor(myBundle), (float)0.1)), new Rectangle(0, 256, myBitmap.Width, myBitmap.Height));
|
||||
}
|
||||
else
|
||||
{
|
||||
toDrawOn.DrawImage(ImageUtilities.ResizeImage(Resources.unknown512, 282, 282), new Point(40, 0));
|
||||
}
|
||||
//main header
|
||||
toDrawOn.FillRectangle(new SolidBrush(headerColor), new Rectangle(0, 0, myBitmap.Width, 281));
|
||||
|
||||
//fill the rest
|
||||
toDrawOn.FillRectangle(new SolidBrush(ControlPaint.Dark(BundleInfos.getSecondaryColor(myBundle), (float)0.1)), new Rectangle(0, 271, myBitmap.Width, myBitmap.Height));
|
||||
//gradient at left and right main header
|
||||
LinearGradientBrush linGrBrush_left = new LinearGradientBrush(new Point(0, 282 / 2), new Point(282, 282 / 2),
|
||||
ControlPaint.Light(headerColor, (float)0.3), headerColor);
|
||||
toDrawOn.FillRectangle(linGrBrush_left, new Rectangle(0, 0, 282, 282));
|
||||
LinearGradientBrush linGrBrush_right = new LinearGradientBrush(new Point(2500, 282 / 2), new Point(1500, 282 / 2),
|
||||
ControlPaint.Light(headerColor, (float)0.3), headerColor);
|
||||
toDrawOn.FillRectangle(linGrBrush_right, new Rectangle(1500, 0, 1000, 282));
|
||||
|
||||
//last folder with border
|
||||
GraphicsPath p = new GraphicsPath();
|
||||
Pen myPen = new Pen(ControlPaint.Light(headerColor, (float)0.2), 3);
|
||||
myPen.LineJoin = LineJoin.Round; //needed to avoid spikes
|
||||
p.AddString(
|
||||
BundleInfos.getLastFolder(BundlePath),
|
||||
Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1],
|
||||
(int)FontStyle.Regular, 55,
|
||||
new Point(342, 40),
|
||||
FontUtilities.leftString
|
||||
);
|
||||
toDrawOn.DrawPath(myPen, p);
|
||||
toDrawOn.FillPath(new SolidBrush(ControlPaint.Dark(headerColor, (float)0.05)), p);
|
||||
|
||||
//name
|
||||
toDrawOn.DrawString(BundleInfos.getBundleDisplayName(myItem), new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1], 115), new SolidBrush(Color.White), new Point(325, 70));
|
||||
|
||||
if (displayImage != null)
|
||||
{
|
||||
JToken assetPathName = displayImage["asset_path_name"];
|
||||
if (assetPathName != null)
|
||||
{
|
||||
string textureFile = Path.GetFileName(assetPathName.Value<string>()).Substring(0, Path.GetFileName(assetPathName.Value<string>()).LastIndexOf('.'));
|
||||
Image challengeIcon;
|
||||
using (var bmpTemp = new Bitmap(JohnWick.AssetToTexture2D(textureFile)))
|
||||
{
|
||||
challengeIcon = new Bitmap(bmpTemp);
|
||||
}
|
||||
toDrawOn.DrawImage(ImageUtilities.ResizeImage(challengeIcon, 282, 282), new Point(40, 0));
|
||||
}
|
||||
}
|
||||
else if (largePreviewImage != null)
|
||||
{
|
||||
JToken assetPathName = largePreviewImage["asset_path_name"];
|
||||
if (assetPathName != null)
|
||||
{
|
||||
string textureFile = Path.GetFileName(assetPathName.Value<string>()).Substring(0, Path.GetFileName(assetPathName.Value<string>()).LastIndexOf('.'));
|
||||
Image challengeIcon;
|
||||
using (var bmpTemp = new Bitmap(JohnWick.AssetToTexture2D(textureFile)))
|
||||
{
|
||||
challengeIcon = new Bitmap(bmpTemp);
|
||||
}
|
||||
toDrawOn.DrawImage(ImageUtilities.ResizeImage(challengeIcon, 282, 282), new Point(40, 0));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
toDrawOn.DrawImage(ImageUtilities.ResizeImage(Resources.unknown512, 282, 282), new Point(40, 0));
|
||||
}
|
||||
|
||||
//fill the rest
|
||||
toDrawOn.FillRectangle(new SolidBrush(ControlPaint.Dark(BundleInfos.getSecondaryColor(myBundle), (float)0.1)), new Rectangle(0, 271, myBitmap.Width, myBitmap.Height));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -130,8 +181,7 @@ namespace FModel
|
|||
toDrawOn.FillRectangle(new SolidBrush(ControlPaint.Dark(myBaseColor, (float)0.1)), new Rectangle(0, 271, myBitmap.Width, myBitmap.Height));
|
||||
|
||||
//last folder
|
||||
toDrawOn.DrawString(Utilities.CaseInsensitiveContains(BundleInfos.getLastFolder(BundlePath), "SEASON", StringComparison.CurrentCultureIgnoreCase) ?
|
||||
SearchResource.getTextByKey("15EB9C4A494F597285CC5CA2EAA571E1", "SEASON") + " " + BundleInfos.getLastFolder(BundlePath).Substring(BundleInfos.getLastFolder(BundlePath).Length - 1) :
|
||||
toDrawOn.DrawString(
|
||||
BundleInfos.getLastFolder(BundlePath),
|
||||
new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1], 42),
|
||||
new SolidBrush(ControlPaint.Dark(myBaseColor, (float)0.05)),
|
||||
|
|
@ -195,7 +245,7 @@ namespace FModel
|
|||
{
|
||||
string rewardId = Path.GetFileName(assetPathName.Value<string>().Substring(0, assetPathName.Value<string>().LastIndexOf(".", StringComparison.Ordinal)));
|
||||
|
||||
if (!rewardId.Equals("AthenaBattlePass_WeeklyChallenge_Token") && !rewardId.Equals("AthenaBattlePass_WeeklyBundle_Token"))
|
||||
if (!assetPathName.Value<string>().Contains("/Game/Items/Tokens/") && !rewardId.Contains("Quest_BR_"))
|
||||
{
|
||||
theY += 140;
|
||||
try //needed for rare cases where the icon is in /Content/icon.uasset and atm idk why but i can't extract
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FModel
|
||||
{
|
||||
public struct BundleInfoEntry : IEquatable<BundleInfoEntry>
|
||||
{
|
||||
internal BundleInfoEntry(string QuestDescription, long QuestCount, string RewardId, string RewardQuantity)
|
||||
{
|
||||
questDescr = QuestDescription;
|
||||
questCount = QuestCount;
|
||||
rewardItemId = RewardId;
|
||||
rewardItemQuantity = RewardQuantity;
|
||||
}
|
||||
public string questDescr { get; set; }
|
||||
public long questCount { get; set; }
|
||||
public string rewardItemId { get; set; }
|
||||
public string rewardItemQuantity { get; set; }
|
||||
|
||||
bool IEquatable<BundleInfoEntry>.Equals(BundleInfoEntry other)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -69,14 +69,14 @@ namespace FModel
|
|||
}
|
||||
|
||||
int numperrow = Settings.Default.mergerImagesRow;
|
||||
var w = 530 * numperrow;
|
||||
if (mySelectedImages.Count * 530 < 530 * numperrow)
|
||||
var w = 527 * numperrow;
|
||||
if (mySelectedImages.Count * 527 < 527 * numperrow)
|
||||
{
|
||||
w = mySelectedImages.Count * 530;
|
||||
w = mySelectedImages.Count * 527;
|
||||
}
|
||||
|
||||
int h = int.Parse(Math.Ceiling(double.Parse(mySelectedImages.Count.ToString()) / numperrow).ToString(CultureInfo.InvariantCulture)) * 530;
|
||||
Bitmap bmp = new Bitmap(w - 8, h - 8);
|
||||
int h = int.Parse(Math.Ceiling(double.Parse(mySelectedImages.Count.ToString()) / numperrow).ToString(CultureInfo.InvariantCulture)) * 527;
|
||||
Bitmap bmp = new Bitmap(w - 5, h - 5);
|
||||
|
||||
var num = 1;
|
||||
var curW = 0;
|
||||
|
|
@ -90,12 +90,12 @@ namespace FModel
|
|||
if (num % numperrow == 0)
|
||||
{
|
||||
curW = 0;
|
||||
curH += 530;
|
||||
curH += 527;
|
||||
num += 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
curW += 530;
|
||||
curW += 527;
|
||||
num += 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -105,26 +105,27 @@ namespace FModel
|
|||
mergeFileName += ".png";
|
||||
|
||||
bmp.Save(App.DefaultOutputPath + "\\" + mergeFileName, ImageFormat.Png);
|
||||
bmp.Dispose();
|
||||
|
||||
OpenMerged(bmp);
|
||||
OpenMerged(App.DefaultOutputPath + "\\" + mergeFileName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// if bitmap exist, open a new form in fullscreen and display the bitmap in a picturebox
|
||||
/// </summary>
|
||||
/// <param name="mergedImage"></param>
|
||||
private static void OpenMerged(Bitmap mergedImage)
|
||||
private static void OpenMerged(string mergedImagePath)
|
||||
{
|
||||
if (mergedImage != null)
|
||||
if (File.Exists(mergedImagePath))
|
||||
{
|
||||
var newForm = new Form();
|
||||
PictureBox pb = new PictureBox();
|
||||
pb.Dock = DockStyle.Fill;
|
||||
pb.Image = mergedImage;
|
||||
pb.Image = Image.FromFile(mergedImagePath);
|
||||
pb.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
|
||||
newForm.WindowState = FormWindowState.Maximized;
|
||||
newForm.Size = mergedImage.Size;
|
||||
newForm.Size = pb.Image.Size;
|
||||
newForm.Icon = Resources.FModel;
|
||||
newForm.Text = App.DefaultOutputPath + @"\" + Settings.Default.mergerFileName + @".png";
|
||||
newForm.StartPosition = FormStartPosition.CenterScreen;
|
||||
|
|
|
|||
|
|
@ -111,26 +111,6 @@ namespace FModel
|
|||
public static string currentSelectedNodePartialPath { get; set; }
|
||||
}
|
||||
|
||||
public struct BundleInfoEntry: IEquatable<BundleInfoEntry>
|
||||
{
|
||||
internal BundleInfoEntry(string QuestDescription, long QuestCount, string RewardId, string RewardQuantity)
|
||||
{
|
||||
questDescr = QuestDescription;
|
||||
questCount = QuestCount;
|
||||
rewardItemId = RewardId;
|
||||
rewardItemQuantity = RewardQuantity;
|
||||
}
|
||||
public string questDescr { get; set; }
|
||||
public long questCount { get; set; }
|
||||
public string rewardItemId { get; set; }
|
||||
public string rewardItemQuantity { get; set; }
|
||||
|
||||
bool IEquatable<BundleInfoEntry>.Equals(BundleInfoEntry other)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public struct PaksEntry : IEquatable<PaksEntry>
|
||||
{
|
||||
internal PaksEntry(string myPak, string myPakGuid)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# FModel
|
||||
|
||||
[](https://github.com/iAmAsval/FModel/releases)
|
||||
[](https://github.com/iAmAsval/FModel//releases/latest)
|
||||
[](https://github.com/iAmAsval/FModel//releases/latest)
|
||||
[](https://github.com/iAmAsval/FModel/blob/master/LICENSE)
|
||||
[](https://twitter.com/AsvalFN)
|
||||
[](https://discord.gg/JmWvXKb)
|
||||
|
|
@ -12,7 +12,7 @@
|
|||
### Prerequisites
|
||||
[.NET Framework 4.7.1](https://dotnet.microsoft.com/download/dotnet-framework/net471)
|
||||
### Download
|
||||
[](https://github.com/iAmAsval/FModel/releases/latest)
|
||||
[](https://github.com/iAmAsval/FModel/releases/latest)
|
||||
### How To Use
|
||||
><p align="center"><a href="https://www.youtube.com/watch?v=rWlux5vg9Xs">Video Tutorial by FireMonkey</a></p>
|
||||
|
||||
|
|
@ -72,7 +72,6 @@ Also if you find this project useful, feel free to give it a :star: thank you :k
|
|||
### What i'm using
|
||||
- [Fortnite Asset Parser](https://github.com/SirWaddles/JohnWickParse) - *C# Bind*
|
||||
- [AutoUpdater.NET](https://github.com/ravibpatel/AutoUpdater.NET)
|
||||
- [JSON Parser](https://app.quicktype.io/)
|
||||
- [ScintillaNET](https://www.nuget.org/packages/jacobslusser.ScintillaNET)
|
||||
- [Find & Replace for ScintillaNET](https://www.nuget.org/packages/snt.ScintillaNet.FindReplaceDialog/)
|
||||
- [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json)
|
||||
|
|
@ -87,7 +86,6 @@ I'd highly suggest you to use [UModel](https://github.com/gildor2/UModel) if you
|
|||
|
||||
## TODO
|
||||
- [ ] Code refactoring
|
||||
- [ ] Special Schematics icon design with weapon icon and ingredients
|
||||
- [ ] New Heroes icon design with perks and more
|
||||
- [ ] New Defenders icon design with useful infos
|
||||
- [x] Translation support
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user