diff --git a/PCK-Studio/Forms/Skins-And-Textures/addnewskin.Designer.cs b/PCK-Studio/Forms/Skins-And-Textures/addnewskin.Designer.cs
index 6bb08225..10dd83df 100644
--- a/PCK-Studio/Forms/Skins-And-Textures/addnewskin.Designer.cs
+++ b/PCK-Studio/Forms/Skins-And-Textures/addnewskin.Designer.cs
@@ -29,8 +29,8 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(addNewSkin));
System.Windows.Forms.Label label3;
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(addNewSkin));
System.Windows.Forms.Label label2;
System.Windows.Forms.Label label1;
this.textTheme = new System.Windows.Forms.TextBox();
@@ -64,6 +64,24 @@
((System.ComponentModel.ISupportInitialize)(this.skinPictureBoxTexture)).BeginInit();
this.SuspendLayout();
//
+ // label3
+ //
+ resources.ApplyResources(label3, "label3");
+ label3.ForeColor = System.Drawing.Color.White;
+ label3.Name = "label3";
+ //
+ // label2
+ //
+ resources.ApplyResources(label2, "label2");
+ label2.ForeColor = System.Drawing.Color.White;
+ label2.Name = "label2";
+ //
+ // label1
+ //
+ resources.ApplyResources(label1, "label1");
+ label1.ForeColor = System.Drawing.Color.White;
+ label1.Name = "label1";
+ //
// textTheme
//
resources.ApplyResources(this.textTheme, "textTheme");
@@ -132,24 +150,6 @@
this.displayBox.Name = "displayBox";
this.displayBox.TabStop = false;
//
- // label3
- //
- resources.ApplyResources(label3, "label3");
- label3.ForeColor = System.Drawing.Color.White;
- label3.Name = "label3";
- //
- // label2
- //
- resources.ApplyResources(label2, "label2");
- label2.ForeColor = System.Drawing.Color.White;
- label2.Name = "label2";
- //
- // label1
- //
- resources.ApplyResources(label1, "label1");
- label1.ForeColor = System.Drawing.Color.White;
- label1.Name = "label1";
- //
// radioAUTO
//
resources.ApplyResources(this.radioAUTO, "radioAUTO");
@@ -199,7 +199,8 @@
this.textSkinID.CustomButton.UseSelectable = true;
this.textSkinID.CustomButton.Visible = ((bool)(resources.GetObject("resource.Visible")));
this.textSkinID.ForeColor = System.Drawing.Color.White;
- this.textSkinID.Lines = new string[0];
+ this.textSkinID.Lines = new string[] {
+ "0"};
resources.ApplyResources(this.textSkinID, "textSkinID");
this.textSkinID.MaxLength = 32767;
this.textSkinID.Name = "textSkinID";
diff --git a/PCK-Studio/Forms/Skins-And-Textures/addnewskin.cs b/PCK-Studio/Forms/Skins-And-Textures/addnewskin.cs
index 880655cb..454991f0 100644
--- a/PCK-Studio/Forms/Skins-And-Textures/addnewskin.cs
+++ b/PCK-Studio/Forms/Skins-And-Textures/addnewskin.cs
@@ -22,7 +22,6 @@ namespace PckStudio
eSkinType skinType;
public bool useCape = false;
- string localID = "0";
PCKProperties generatedModel = new PCKProperties();
enum eSkinType : int
@@ -38,7 +37,6 @@ namespace PckStudio
public addNewSkin(LOCFile loc)
{
InitializeComponent();
- textSkinID.Text = localID;
currentLoc = loc;
}
@@ -281,8 +279,6 @@ namespace PckStudio
{
bool validSkinId = int.TryParse(textSkinID.Text, out _);
textSkinID.ForeColor = validSkinId ? Color.Green : Color.Red;
- if (radioLOCAL.Checked && validSkinId)
- localID = textSkinID.Text;
}
private void CreateCustomModel_Click(object sender, EventArgs e)
@@ -345,21 +341,26 @@ namespace PckStudio
private void radioLOCAL_CheckedChanged(object sender, EventArgs e)
{
- if (radioLOCAL.Checked)
- {
- textSkinID.Text = localID;
- textSkinID.Enabled = true;
- }
+ textSkinID.Enabled = radioLOCAL.Checked;
}
private void pictureBox1_Click(object sender, EventArgs e)
{
using (var ofdd = new OpenFileDialog())
{
- ofdd.Filter = "PNG Files | *.png";
- ofdd.Title = "Select a PNG File";
+ ofdd.Filter = "PNG Files | *.png | 3DS Texture|*.3dst";
+ ofdd.Title = "Select a Skin Texture File";
if (ofdd.ShowDialog() == DialogResult.OK)
{
+ if (ofdd.FileName.EndsWith(".3dst"))
+ {
+ using (var fs = File.OpenRead(ofdd.FileName))
+ {
+ checkImage(_3DSUtil.GetImageFrom3DST(fs));
+ textSkinName.Text = Path.GetFileNameWithoutExtension(ofdd.FileName);
+ }
+ return;
+ }
checkImage(Image.FromFile(ofdd.FileName));
}
}
diff --git a/PCK-Studio/Forms/Skins-And-Textures/addnewskin.resx b/PCK-Studio/Forms/Skins-And-Textures/addnewskin.resx
index b8f6fba7..a4bc13b6 100644
--- a/PCK-Studio/Forms/Skins-And-Textures/addnewskin.resx
+++ b/PCK-Studio/Forms/Skins-And-Textures/addnewskin.resx
@@ -117,14 +117,114 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ False
+
+
+
+ True
+
+
+
+ NoControl
+
+
+ 215, 129
+
+
+ 71, 13
+
+
+ 106
+
+
+ Theme Name
+
+
+ label3
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
+ 18
+
+
+ False
+
+
+ True
+
+
+ NoControl
+
+
+ 215, 97
+
+
+ 59, 13
+
+
+ 104
+
+
+ Skin Name
+
+
+ label2
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
+ 19
+
+
+ False
+
+
+ True
+
+
+ NoControl
+
+
+ 215, 64
+
+
+ 42, 13
+
+
+ 102
+
+
+ Skin ID
+
+
+ label1
+
+
+ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
+ 20
+
102, 78
239, 20
-
32
@@ -191,7 +291,6 @@
False
-
Flat
@@ -340,105 +439,6 @@
17
-
- False
-
-
- True
-
-
- NoControl
-
-
- 215, 129
-
-
- 71, 13
-
-
- 106
-
-
- Theme Name
-
-
- label3
-
-
- System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- $this
-
-
- 18
-
-
- False
-
-
- True
-
-
- NoControl
-
-
- 215, 97
-
-
- 59, 13
-
-
- 104
-
-
- Skin Name
-
-
- label2
-
-
- System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- $this
-
-
- 19
-
-
- False
-
-
- True
-
-
- NoControl
-
-
- 215, 64
-
-
- 42, 13
-
-
- 102
-
-
- Skin ID
-
-
- label1
-
-
- System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- $this
-
-
- 20
-
True
@@ -595,6 +595,9 @@
121
+
+ 0
+
textSkinID
diff --git a/PCK-Studio/MainForm.cs b/PCK-Studio/MainForm.cs
index 180db693..8bc2c526 100644
--- a/PCK-Studio/MainForm.cs
+++ b/PCK-Studio/MainForm.cs
@@ -8,7 +8,6 @@ using System.Drawing.Drawing2D;
using System.Diagnostics;
using System.Drawing.Imaging;
using RichPresenceClient;
-using Ohana3DS_Rebirth.Ohana;
using PckStudio.Properties;
using PckStudio.Classes.FileTypes;
using PckStudio.Classes.IO;
@@ -19,6 +18,7 @@ using PckStudio.Forms.Utilities;
using PckStudio.Forms.Editor;
using PckStudio.Forms.Additional_Popups.Animation;
using PckStudio.Classes.IO.PCK;
+using PckStudio.Classes.Utils;
namespace PckStudio
{