mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-18 02:21:58 +00:00
Merge branch 'main' into 3dSkinRenderer
This commit is contained in:
4
PCK-Studio/Features/CemuPanel.Designer.cs
generated
4
PCK-Studio/Features/CemuPanel.Designer.cs
generated
@@ -118,7 +118,7 @@
|
||||
this.radioButtonEur.Size = new System.Drawing.Size(137, 30);
|
||||
this.radioButtonEur.TabIndex = 1;
|
||||
this.radioButtonEur.TabStop = true;
|
||||
this.radioButtonEur.Text = "EUR";
|
||||
this.radioButtonEur.Text = "EU";
|
||||
this.radioButtonEur.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radioButtonEur.UseVisualStyleBackColor = false;
|
||||
this.radioButtonEur.Click += new System.EventHandler(this.radioButton_Click);
|
||||
@@ -164,7 +164,7 @@
|
||||
this.radioButtonJap.Name = "radioButtonJap";
|
||||
this.radioButtonJap.Size = new System.Drawing.Size(138, 30);
|
||||
this.radioButtonJap.TabIndex = 2;
|
||||
this.radioButtonJap.Text = "JAP";
|
||||
this.radioButtonJap.Text = "JP";
|
||||
this.radioButtonJap.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.radioButtonJap.UseVisualStyleBackColor = false;
|
||||
this.radioButtonJap.Click += new System.EventHandler(this.radioButton_Click);
|
||||
|
||||
@@ -392,6 +392,12 @@ namespace PckStudio
|
||||
}
|
||||
string nodeText = path.Substring(0, path.IndexOf(seperator));
|
||||
string subPath = path.Substring(path.IndexOf(seperator) + 1);
|
||||
|
||||
if (string.IsNullOrWhiteSpace(nodeText))
|
||||
{
|
||||
return BuildNodeTreeBySeperator(root, subPath, seperator);
|
||||
}
|
||||
|
||||
bool alreadyExists = root.ContainsKey(nodeText);
|
||||
TreeNode subNode = alreadyExists ? root[nodeText] : CreateNode(nodeText);
|
||||
if (!alreadyExists) root.Add(subNode);
|
||||
@@ -959,13 +965,15 @@ namespace PckStudio
|
||||
if (node == null) return;
|
||||
string path = node.FullPath;
|
||||
|
||||
using TextPrompt diag = new TextPrompt(node.Tag is null ? Path.GetFileName(node.FullPath) : node.FullPath);
|
||||
bool isFile = node.TryGetTagData<PckFileData>(out var file);
|
||||
|
||||
using TextPrompt diag = new TextPrompt(isFile ? file.Filename : Path.GetFileName(node.FullPath));
|
||||
|
||||
if (diag.ShowDialog(this) == DialogResult.OK)
|
||||
{
|
||||
if (node.Tag is PckFileData file)
|
||||
if (isFile)
|
||||
{
|
||||
if (currentPCK.TryGetFile(diag.NewText, file.Filetype, out _))
|
||||
if (currentPCK.Contains(diag.NewText, file.Filetype))
|
||||
{
|
||||
MessageBox.Show(this, $"{diag.NewText} already exists", "File already exists");
|
||||
return;
|
||||
@@ -1469,6 +1477,12 @@ namespace PckStudio
|
||||
return;
|
||||
}
|
||||
|
||||
if (targetNode.Parent == null && isTargetPckFile && draggedNode.Parent == null)
|
||||
{
|
||||
Debug.WriteLine("target node is file and is in the root... nothing done.");
|
||||
return;
|
||||
}
|
||||
|
||||
if ((targetNode.Parent?.Equals(draggedNode.Parent) ?? false) && isTargetPckFile)
|
||||
{
|
||||
Debug.WriteLine("target node and dragged node have the same parent... nothing done.");
|
||||
|
||||
Reference in New Issue
Block a user