From 71e11bbcc92c8c0d1a5d5d1b72a1f2514408c3c6 Mon Sep 17 00:00:00 2001 From: Asval Date: Sat, 11 May 2019 14:35:40 +0200 Subject: [PATCH] wrapped description + credits + contributors in readme + fixed old backup not working with new code --- FModel/Forms/About.Designer.cs | 47 +++++++++++++++++++++++++++++++++- FModel/MainWindow.cs | 15 +++++------ README.md | 5 ++++ 3 files changed, 57 insertions(+), 10 deletions(-) diff --git a/FModel/Forms/About.Designer.cs b/FModel/Forms/About.Designer.cs index 6d5213ac..1b8bd20f 100644 --- a/FModel/Forms/About.Designer.cs +++ b/FModel/Forms/About.Designer.cs @@ -35,6 +35,9 @@ this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // @@ -98,11 +101,50 @@ this.label3.Text = "If you find this project useful, feel free to give it a star on GitHub\r\n⊂(◉‿◉)つ"; this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // + // label4 + // + this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label4.Location = new System.Drawing.Point(12, 123); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(42, 13); + this.label4.TabIndex = 6; + this.label4.Text = "Credits:"; + this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label5 + // + this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label5.AutoSize = true; + this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label5.Location = new System.Drawing.Point(56, 124); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(46, 12); + this.label5.TabIndex = 7; + this.label5.Text = "• AyeTSG"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // label6 + // + this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label6.AutoSize = true; + this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label6.Location = new System.Drawing.Point(108, 124); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(61, 12); + this.label6.TabIndex = 8; + this.label6.Text = "• FireMonkey"; + this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // // About // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(467, 115); + this.ClientSize = new System.Drawing.Size(467, 145); + this.Controls.Add(this.label6); + this.Controls.Add(this.label5); + this.Controls.Add(this.label4); this.Controls.Add(this.linkLabel2); this.Controls.Add(this.linkLabel1); this.Controls.Add(this.label1); @@ -130,5 +172,8 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label6; } } \ No newline at end of file diff --git a/FModel/MainWindow.cs b/FModel/MainWindow.cs index df495f56..a2d28146 100644 --- a/FModel/MainWindow.cs +++ b/FModel/MainWindow.cs @@ -680,6 +680,10 @@ namespace FModel if (theDialog.ShowDialog() == DialogResult.OK) { String[] linesA = File.ReadAllLines(theDialog.FileName); + for (int i = 0; i < linesA.Length; i++) + if (!linesA[i].StartsWith("../")) + linesA[i] = "../" + linesA[i]; + IEnumerable onlyB = pakAsTxt.Except(linesA); IEnumerable removed = linesA.Except(pakAsTxt); @@ -1517,7 +1521,7 @@ namespace FModel } //NAME try { - g.DrawString(theItem.Description, new Font("Arial", 10), new SolidBrush(Color.White), new Point(522 / 2, 465), _centeredStringLine); + g.DrawString(theItem.Description, new Font("Arial", 10), new SolidBrush(Color.White), new RectangleF(5, 441, 512, 49), _centeredStringLine); } catch (NullReferenceException) { @@ -1707,7 +1711,7 @@ namespace FModel Image rarityBg = Resources.R512; toDrawOn.DrawImage(rarityBg, new Point(0, 0)); } - if (theItem.Rarity == "EFortRarity::Common") + if (theItem.Rarity == "EFortRarity::Common" || SpecialMode == "ammo") // Force common rarity if ammo, as ammo is always common in FN { Image rarityBg = Resources.C512; toDrawOn.DrawImage(rarityBg, new Point(0, 0)); @@ -1717,13 +1721,6 @@ namespace FModel Image rarityBg = Resources.U512; toDrawOn.DrawImage(rarityBg, new Point(0, 0)); } - - // Force common rarity if ammo, as ammo is always common in FN - if (SpecialMode == "ammo") - { - Image rarityBg = Resources.C512; - toDrawOn.DrawImage(rarityBg, new Point(0, 0)); - } } private void GetItemIcon(ItemsIdParser theItem, bool featured = false) { diff --git a/README.md b/README.md index af81a7ec..67a572f7 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,11 @@ If issues occur when compiling the source code, make sure that the software is b ### Why FModel This project is mainly based on what [UModel](https://github.com/gildor2/UModel) can do, in a personalized way, in case UModel doesn't work, as a temporary rescue solution. I'd highly suggest you to use [UModel](https://github.com/gildor2/UModel) instead if you wanna use something made professionnaly. +### Contributors +| **AyeTSG** | **FireMonkey** | +| :---: |:---:| +| [![AyeTSG](https://avatars1.githubusercontent.com/u/49595354?s=200&v=4)](https://github.com/AyeTSG) | [![FireMonkey](https://avatars2.githubusercontent.com/u/38590471?s=200&v=4)](https://github.com/ItsFireMonkey) | +| `https://twitter.com/AyeTSG` | `https://twitter.com/FireMonkeyFN` | ## TODO - [ ] Support for meshes