From 166e4630b1259d73ee710395f6b7156ef713bf9d Mon Sep 17 00:00:00 2001 From: Bitl Date: Sun, 5 Sep 2021 08:05:07 -0700 Subject: [PATCH] small item creation sdk updates --- .../Forms/SDK/ItemCreationSDK.Designer.cs | 13 +++++----- .../Forms/SDK/ItemCreationSDK.cs | 26 +++++++++++++------ 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/Novetus/NovetusLauncher/Forms/SDK/ItemCreationSDK.Designer.cs b/Novetus/NovetusLauncher/Forms/SDK/ItemCreationSDK.Designer.cs index 637de49..33251e4 100644 --- a/Novetus/NovetusLauncher/Forms/SDK/ItemCreationSDK.Designer.cs +++ b/Novetus/NovetusLauncher/Forms/SDK/ItemCreationSDK.Designer.cs @@ -204,7 +204,7 @@ partial class ItemCreationSDK // // ZBox2 // - this.ZBox2.DecimalPlaces = 6; + this.ZBox2.DecimalPlaces = 20; this.ZBox2.Location = new System.Drawing.Point(27, 65); this.ZBox2.Maximum = new decimal(new int[] { 1661992959, @@ -227,7 +227,7 @@ partial class ItemCreationSDK // // YBox2 // - this.YBox2.DecimalPlaces = 6; + this.YBox2.DecimalPlaces = 20; this.YBox2.Location = new System.Drawing.Point(27, 39); this.YBox2.Maximum = new decimal(new int[] { 1661992959, @@ -250,7 +250,7 @@ partial class ItemCreationSDK // // XBox360 // - this.XBox360.DecimalPlaces = 6; + this.XBox360.DecimalPlaces = 20; this.XBox360.Location = new System.Drawing.Point(27, 14); this.XBox360.Maximum = new decimal(new int[] { 1661992959, @@ -556,7 +556,7 @@ partial class ItemCreationSDK // // ZBox // - this.ZBox.DecimalPlaces = 6; + this.ZBox.DecimalPlaces = 20; this.ZBox.Location = new System.Drawing.Point(27, 65); this.ZBox.Maximum = new decimal(new int[] { 1661992959, @@ -579,7 +579,7 @@ partial class ItemCreationSDK // // YBox // - this.YBox.DecimalPlaces = 6; + this.YBox.DecimalPlaces = 20; this.YBox.Location = new System.Drawing.Point(27, 39); this.YBox.Maximum = new decimal(new int[] { 1661992959, @@ -602,7 +602,7 @@ partial class ItemCreationSDK // // XBox // - this.XBox.DecimalPlaces = 6; + this.XBox.DecimalPlaces = 20; this.XBox.Location = new System.Drawing.Point(27, 14); this.XBox.Maximum = new decimal(new int[] { 1661992959, @@ -797,6 +797,7 @@ partial class ItemCreationSDK this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Novetus Item Creation SDK"; this.Load += new System.EventHandler(this.ItemCreationSDK_Load); + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ItemCreationSDK_Close); this.ItemSettingsGroup.ResumeLayout(false); this.ItemSettingsGroup.PerformLayout(); this.CoordGroup2.ResumeLayout(false); diff --git a/Novetus/NovetusLauncher/Forms/SDK/ItemCreationSDK.cs b/Novetus/NovetusLauncher/Forms/SDK/ItemCreationSDK.cs index a30955a..c47c4bd 100644 --- a/Novetus/NovetusLauncher/Forms/SDK/ItemCreationSDK.cs +++ b/Novetus/NovetusLauncher/Forms/SDK/ItemCreationSDK.cs @@ -41,6 +41,11 @@ public partial class ItemCreationSDK : Form SpecialMeshTypeBox.SelectedItem = "Head"; } + private void ItemCreationSDK_Close(object sender, FormClosingEventArgs e) + { + DeleteStrayIcons(); + } + private void BrowseImageButton_Click(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(ItemNameBox.Text)) @@ -97,14 +102,7 @@ public partial class ItemCreationSDK : Form private void ItemTypeListBox_SelectedIndexChanged(object sender, EventArgs e) { - string itempath = GetPathForType(type) + "\\" + ItemNameBox.Text.Replace(" ", "") + ".png"; - string previconpath = itempath + ".png"; - string rbxmpath = itempath + ".rbxm"; - - if (File.Exists(previconpath) && !File.Exists(rbxmpath)) - { - GlobalFuncs.FixedFileDelete(previconpath); - } + DeleteStrayIcons(); type = GetTypeForInt(ItemTypeListBox.SelectedIndex); @@ -881,6 +879,18 @@ public partial class ItemCreationSDK : Form Warning.Text = warningtext; } + + private void DeleteStrayIcons() + { + string itempath = GetPathForType(type) + "\\" + ItemNameBox.Text.Replace(" ", "") + ".png"; + string previconpath = itempath + ".png"; + string rbxmpath = itempath + ".rbxm"; + + if (File.Exists(previconpath) && !File.Exists(rbxmpath)) + { + GlobalFuncs.FixedFileDelete(previconpath); + } + } #endregion } #endregion