From 904e263f184d19b530a226404b2023f5b13b7bb1 Mon Sep 17 00:00:00 2001 From: MayNL Date: Sat, 11 Apr 2026 03:47:54 -0400 Subject: [PATCH] BoxEditor now only enabled when 1 box is selected --- PCK-Studio/Forms/Editor/CustomSkinEditor.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/PCK-Studio/Forms/Editor/CustomSkinEditor.cs b/PCK-Studio/Forms/Editor/CustomSkinEditor.cs index 29e81c3b..6be5d0c6 100644 --- a/PCK-Studio/Forms/Editor/CustomSkinEditor.cs +++ b/PCK-Studio/Forms/Editor/CustomSkinEditor.cs @@ -74,7 +74,7 @@ namespace PckStudio.Forms.Editor skinNameLabel.Text = EditorValue.MetaData.Name; if (EditorValue.HasCape) renderer3D1.CapeTexture = EditorValue.CapeTexture; - boxEditorControl1.Enabled = false; // make disabled until a box is selected - May + boxEditorControl1.Enabled = false; // enabled by default just in case - May LoadModelData(); } @@ -277,10 +277,15 @@ namespace PckStudio.Forms.Editor int scale = 1; renderer3D1.SelectedIndices = skinPartListBox.SelectedIndices.Cast().ToArray(); + // make disabled until a box is confirmed selected - May + boxEditorControl1.Enabled = false; + // TODO: highlight all selected boxes if (skinPartListBox.SelectedItem is SkinBOX box) { - boxEditorControl1.Enabled = true; + // enable box editor only if selecting + boxEditorControl1.Enabled = skinPartListBox.SelectedItems.Count < 2; + boxEditorControl1.SetBOX(box); Image uvArea = EditorValue.Texture.GetArea(Rectangle.Truncate(new RectangleF(box.UV.X, box.UV.Y, box.Size.X * 2 + box.Size.Z * 2, box.Size.Z + box.Size.Y))); @@ -307,10 +312,6 @@ namespace PckStudio.Forms.Editor } uvPictureBox.Invalidate(); } - else - { - boxEditorControl1.Enabled = false; - } } private void captureScreenshotButton_Click(object sender, EventArgs e)